Skip to Content
0

ReportDocument PrintToPrinter slow

Nov 20, 2017 at 03:21 PM

70

avatar image
Former Member

I try to print a report using the PrintToPrinter method in CR 13.0.19.2312. It takes a lot of time.

var printerSettings = new System.Drawing.Printing.PrinterSettings {PrinterName = printerPath};
var pageSettings = new PageSettings(printerSettings);
var printLayout = new PrintLayoutSettings();   
report.PrintToPrinter(printerSettings, pageSettings, false, printLayout);

It seems to be a known problem with the solution to use

 PrintOutputController.PrintReport 

instead. However, as far a I understood, the printer must be configured in the "Printers" dialog of the Windows Account that is printing. This is not that easy because it is "NETWORK SERVICE".

Is there any other possibility to print the report without a large delay?

Thank you!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Don Williams
Nov 21, 2017 at 02:14 PM
0

Hi Alexander,

On the download WIKI there is a Printer test app:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

And it has this link to a printer test app I wrote, see if using PrinterPitputController works better:

https://blogs.sap.com/2015/08/19/printing-crystal-reports-in-net/

Issues can be No Printer Checked on with Dissociate not checked on. Always use Dissociate, it removes the dependency on the printer the report was designed with. If they are Labels then you must define the paper size in the printer and select it for the report.

The test app works for all printers, except possibly Dot Matrix printers, we don't work well with them due to the way they work. CR outputs an image of each page so it's slow printing.

Don

Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Nov 20, 2017 at 03:22 PM
0

What SDK are you using?

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 21, 2017 at 02:09 PM
0

Crystal Reports for Visual Studio Version 13.0.19.2312

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 21, 2017 at 03:15 PM
0

I tried 13.0.19 and 13.0.21

Share
10 |10000 characters needed characters left characters exceeded