Crystal报表查看器内置导出按钮问题 [英] Crystal Report viewer built in Export button problem
问题描述
我使用VS 2010,网络应用程序与.net 4,
我从Microsoft建议的网站下载了Crystal报表。
我向我的网页添加了一个水晶报表,拖动了一个CrystalReportViewer和一个按钮。
我在button_click中放入以下代码: / p>
ReportDocument cryRpt;
cryRpt = new ReportDocument();
cryRpt.Load(C:\\Users\\Yazan\\Documents\\Visual Studio 2010\\WebSites\\WebSite17\\\CrystalReport.rpt );
CrystalReportViewer.ReportSource = cryRpt;
CrystalReportViewer1.RefreshReport();
因此很明显,当点击按钮时,CrystalReportViewer会出现创建)。
当点击导出按钮(已经存在于CrystalReportViewer的工具栏中)时,会弹出一个窗口,让我选择格式类型我想导出到,并指定要导出报告的哪些页面。
当我单击导出按钮时,页面是回发,CrystalReportViewer消失,和我上帝我的旧网页(没有CrystalReportViewer)包含以下消息:
无法使用您指定的选项导出,请检查您的选项,然后重试。
请注意,此错误发生在所有类型的文件格式导出到(pdf,doc ...)
感谢
在Crystal Reports查看器中修改ReportSourceID
I am using VS 2010, Web application with .net 4,
I downloaded Crystal report from the website that Microsoft suggests.
I added a crystal report to my web page, dragged a CrystalReportViewer, and a button.
I put in the button_click the following code:
ReportDocument cryRpt;
cryRpt = new ReportDocument();
cryRpt.Load("C:\\Users\\Yazan\\Documents\\Visual Studio 2010\\WebSites\\WebSite17\\CrystalReport.rpt");
CrystalReportViewer1.ReportSource = cryRpt;
CrystalReportViewer1.RefreshReport();
So it is obvious that when the button is clicked, the CrystalReportViewer appears (showing the Crystal Report I already created).
when the export button (that is already exists in the toolbar of the CrystalReportViewer) is clicked, a window is poped up letting me choose the type of format that I want to export to, and specify which pages of the report I want to export.
When I click the export button, the page is postback, and the CrystalReportViewer disappeared, and I god my old web page (without CrystalReportViewer) containing the following message:
"Failed to export using the options you specified. Please check your options and try again."
Note that this error happens for all types of file format to export to (pdf, doc...)
Please can you help me to activate the built in export button of the CrystalReportViewer?
Thanks
Modify the ReportSourceID in the Crystal Reports Viewer
这篇关于Crystal报表查看器内置导出按钮问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!