在C#.net WinForms应用程序中以编程方式导出Crystal报表 [英] Export Crystal Report Programatically in C#.net WinForms Application

查看:78
本文介绍了在C#.net WinForms应用程序中以编程方式导出Crystal报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试以编程方式在C#.net WinForms应用程序中导出Crytal报告.我仅想导出报告而不保存在磁盘中,它会要求像Asp.net一样打开或保存.

Hi,
I m Trying to Export Crytal Report Programatically in C#.net WinForms Application.I want to Export Report only not save in my Disk, it will ask to open or Save like Asp.net.

推荐答案

您不能仅导出".

这是做我想做的事情的一种方法:

0)导出报告并将其保存到用户的temp文件夹中
-查看水晶报表中的"exporttodisk"方法.
-查看特殊目录"

1)显示一个对话框,询问打开"或保存"

2)根据用户选择的操作,打开从temp目录导出的文件或将文件复制到选择的路径

3)删除临时目录中的文件
You can''t "just export".

Here is a way to do what I think you want:

0) export the report and save it to the users temp folder
- Look at the ''exporttodisk'' method from you crystal report.
- Look at the ''specialdirectories''

1) show a dialog asking ''open'' or ''save''

2) depending on the action chosen by the user open the exported file from temp directory or copy the file to the chosen path

3) delete the file in the temp directory


这篇关于在C#.net WinForms应用程序中以编程方式导出Crystal报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆