Click here to Skip to main content
15,885,875 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I created a Crystal Report, now i want to print that report directly without popping up that Crystal report viewer. Can any one help me on this. I am using ASP.Net for front end and C# for backend development.
Posted
Updated 22-Jul-14 10:39am
v2
Comments
Dilan Shaminda 22-Jul-14 12:48pm    
what have you tried so far?
ZurdoDev 22-Jul-14 16:38pm    
Where are you stuck?

1 solution

You can use rptDoc.PrintToPrinter method to directly print crystal report.

Add these lines at the end of your report printing funtion

C#
System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();
rptDoc.PrintOptions.PrinterName = "Printer Name";
rptDoc.PrintToPrinter(1, true, 0, 0);


Check this article as well

http://www.authorcode.com/how-to-print-crystal-report-without-report-viewer-or-any-print-dialog-in-c/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900