Joined: 01 Jun 2007
Location: India
Online Status: Offline
Posts: 1
Topic: Avoiding print dialog box in crystal report .net Posted: 01 Jun 2007 at 6:28am
I m writing an application which requires a report to go directly the printer. I used crystalreportviewer and its printreport() method to send it to printer but it always opens up print dialog. Is there any way to avoid/bypass print dialog? I read about printtoprinter method but its not available with report viewer.
You can use PrintToPrinter() method to directly print the Crystal Report to printer. Ensure that you have a printer that is configured as the default printer.
Assuming that you declared a ReportDocument variable as rptDoc.
rptDoc.PrintToPrinter(1, False, 1, 1)
where:
1 - no of copies
False - no collate
1 - first page you want to print
1 - last page you want to print
You can change the values if you need to print more.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 05 Oct 2007 at 10:01am
Are you ONLY using CR XI? Then no, CR XI is like any app where it prompts you for which printer you want to use.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum