We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to silent print the report without using print dialog

Platform: WPF |
Control: ReportViewer

The default print option available in the report viewer control shows a print dialog to choose the printer and other settings. The silent printing of report without rendering in preview and without displaying print dialog can be achieved by exporting the reports into PDF and using the PDF document for printing. The Syncfusion ReportWriter library allows to export the report to various file formats without rendering in preview. The following steps illustrates silent printing of a report.

  1. Initialize the ReportWriter and set the ReportPath and ProcessingMode properties that are required to process the report.
  2. Set the DataSources data collection input to the report.
  3. Invoke Save() to store the report stream and load the resultant stream to PdfDocumentView as shown in the following codes



string reportPath = @"../../ReportTemplate/Product Details.rdlc";
ReportWriter reportWriter = new ReportWriter(reportPath);
reportWriter.ReportProcessingMode = ProcessingMode.Local;
reportWriter.DataSources.Add(new ReportDataSource { Name = "DataSet1", Value = ProductCatalog.GetData() });
MemoryStream stream = new MemoryStream();
reportWriter.Save(stream, WriterFormat.PDF);
PdfDocumentView pdfViewer = new PdfDocumentView();
var doc = pdfViewer.PrintDocument as IDocumentPaginatorSource;


  1. Get the installed printer list and set the current printer to PrintDialog.
  2. Invoke the PrintDocument() method to print the report without displaying the print dialog options.



PrintDialog printDialog = new PrintDialog();
List<string> printersList = new List<string>();
List<string> serversList = new List<string>();
var server = new PrintServer();
var queues = server.GetPrintQueues(new[] { EnumeratedPrintQueueTypes.Local});
foreach (var queue in queues)
server = new PrintServer(serversList[0].ToString());
PrintQueue printer1 = server.GetPrintQueue(printersList[2].ToString());
printDialog.PrintQueue = printer1;
printDialog.PrintDocument(doc.DocumentPaginator, "PDF PRINTER");




2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment
Dec 31, 2018

how to set copies


Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile