Printing woes..

dreamtime

Active member
Joined
May 13, 2005
Messages
26
Programming Experience
1-3
I am trying to send a report to a printer, but I need to do it directly with out any user interaction (other than a printdialog - ie. no report viewer).

This has been fine up until a recent problem with a specific printer which has highlighted a failure in the application. This printer is defaulting to a resolution of 600 x 600 (an HP 2100 laserjet) which is not good enough for the graphics from the report.

This has made me realise that even if I set the printer settings and the printing defaults for the printer (in control panel>printers), it still prints at this resolution.

If I use the Crystal Report viewer print dialog and set the resolution to 1200 x 1200, it outputs correctly.

The method I am using is this...

PrintDialog1.Document = new System.Drawing.Printing.PrintDocument
PrintDialog1.ShowDialog()
report.PrintOptions.PrinterName = PrintDialog1.PrinterSettings.PrinterName
report.PrintToPrinter(PrintDialog1.PrinterSettings.Copies, False, 1, 1)

Is there any way to make the user settings in the PrintDialog (draft mode, resolution, mono, etc) affect the printed report sent to the printer using report.printtoprinter?

Is there a better way of doing this?

Any help would be appreciated.
 
Back
Top