简体   繁体   中英

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.

the hint in the print dialog shows the instruction of print

The viewer must export to PDF to print.

you can use this way it`s better and more efficient than opening the viewer and print it in PDF format

  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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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