Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Crystal Report print directly to printer without exporting to PDF?

I have a web application in Asp.net which is using Crystal Reports and I am using CrystalReportViewer to show crystal report on my aspx page. When I click on Print Button to Print it show me Message

The viewer must export to PDF to print. Choose the Print option from the PDF reader application once the document is opened. Note: You must have a PDF reader installed to print. (eg. Adobe Reader)

It doesn't Print my report directly . Please help.....

like image 666
satyender Avatar asked Oct 06 '15 04:10

satyender


People also ask

How do I print directly from Crystal Report Viewer?

The easiest way to add printing capabilities to your SAP Crystal Reports . NET application is to use the print button on the CrystalReportViewer control. The print button is enabled on the CrystalReportViewer toolbar by default.


1 Answers

Crystal report has PrintToPrinter method to print report direct to printer.

like this

crystalReportDocument.Load("your crystal report file path");
crystalReportDocument.SetDataSource("report data source");
crystalReportDocument.PrintOptions.PrinterName = "your printer name"
crystalReportDocument.PrintToPrinter(1, true, 0, 0);
like image 52
Sain Pradeep Avatar answered Oct 14 '22 00:10

Sain Pradeep