Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8538

Re: Crystal Reports prints to default printer no matter what

$
0
0

Csaba,

 

Thanks very much. I basically fixed my problem with a mixture of code and editing the report & changing the Page Setup in Crystal Reports 11. We were currently using XI R2 so I think this is partly where the issue lied.

 

Code:

Dim PrintLayout As New CrystalDecisions.Shared.PrintLayoutSettings

PrintLayout.Scaling = CrystalDecisions.Shared.PrintLayoutSettings.PrintScaling.Scale

 

Dim printerSettings As New System.Drawing.Printing.PrinterSettings()

printerSettings.PrinterName = printerName

 

Dim pageSettings As New System.Drawing.Printing.PageSettings(printerSettings)

 

CrystalReport.PrintOptions.PrinterName = printerName

CrystalReport.PrintOptions.DissociatePageSizeAndPrinterPaperSize = True

 

CrystalReport.PrintToPrinter(printerSettings, pageSettings, False, PrintLayout

 

I then set 'No Printer' and 'DissociatePageSizeAndPrinterPaperSize' both to True and then manually specified the page dimensions.


Viewing all articles
Browse latest Browse all 8538

Trending Articles