简体   繁体   English

打印选项在asp.net项目的Crystal Report Viewer 2013中无法正常工作

[英]Print Option doesn't work correctly in crystal report viewer 2013 on asp.net Project

I enabled report viewer print button for printing purpose. 我启用了报表查看器打印按钮以进行打印。 the problem is when i clicked on print button print to pdf dialog appears, I have installed printer on both server and my PC so there is no problem with printer availability. 问题是当我单击“打印print to pdf对话框的“打印”按钮时,我已经在服务器和PC上安装了打印机,因此打印机的可用性没有问题。

the hint in the print dialog shows the instruction of print 打印对话框中的提示显示了打印说明

The viewer must export to PDF to print. 查看器必须导出为PDF才能打印。

you can use this way it`s better and more efficient than opening the viewer and print it in PDF format 您可以使用这种方式,比打开查看器并以PDF格式打印它更好,更高效

  cryRpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "ExportedReport")

the thing is that when binding the report, your datasource will disposed automatically then when you are trying to print it to PDF from the viewer there will be no datasource.... but there is a solution you need to find at which event the viewer is disposing the datasource and prevent it of doing such. 事实是,绑定报表时,您的数据源将自动处理,然后当您尝试从查看器将其打印为PDF时,将没有数据源....但是您需要一种解决方案来查找查看器正在布置数据源并阻止它这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM