CrystalReportViewer Control for VB.NET

markganley

New member
Joined
Jan 10, 2006
Messages
1
Programming Experience
10+
Hi,
Wonder if anyone can help. I am using the CrystalReportViewer control within VB.NET. Get the display bar allowing the report to be printed. What I need to do is on click of the print icon...I need to get the report to automatically print direct to the printer in PDF format.
As the stated control output is PDF, on click of the print icon the report is brought up in ADOBE pop-up. You then have to print it from there. I just need to bypass this stage and avoid any popup.

Thanks
Mark
 
Quick and easy...
Add a print button and print dialog to the form the report viewer is on and add the code to print there: You could then set the display print button to false for the viewer.

'ReportName.PrintOptions.PrinterName = PrintDialog1.PrinterSettings.PrinterName
'ReportName.PrintOptions.PaperOrientation = CrystalDecisions.[Shared].PaperOrientation.Portrait
'ReportName.PrintToPrinter(PrintDialog1.PrinterSettings.Copies, True, 1, 99)


Otherwise you will have to override the print buttons function of the report viewer - not all that easy.
 
Back
Top