Progress® Telerik® Reporting R3 2020
ReportProcessor.PrintReport Method (ReportSource, PrinterSettings, String)
Prints a report document using the specified printer settings and output format.
Namespace:
Telerik.Reporting.ProcessingAssembly: Telerik.Reporting (in Telerik.Reporting.dll)
Syntax
public void PrintReport( ReportSource reportSource, PrinterSettings printerSettings, string outputFormat )
Parameters
- reportSource
- Type: Telerik.ReportingReportSource
Specifies the ReportSource for the report document to print. - printerSettings
- Type: System.Drawing.PrintingPrinterSettings
Specifies the printer settings to be used when printing the document. If null or invalid settings are specified, the Print Dialog appears. - outputFormat
- Type: SystemString
Specifies the output format to be used when printing the document. If not specified, the EMF format will be used.
Remarks
To prevent the Print Dialog from appearing, you should specify valid
printer settings to this method.
Examples
This example illustrates how to prevent the standard Print Dialog from
appearing in a batch print operation or when printing from a service.
var reportName = "Telerik.Reporting.Examples.CSharp.Dashboard, CSharp.ReportLibrary"; // Obtain the settings of the default printer System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings(); // The standard print controller comes with no UI System.Drawing.Printing.PrintController standardPrintController = new System.Drawing.Printing.StandardPrintController(); // Print the report using the custom print controller Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor(); reportProcessor.PrintController = standardPrintController; Telerik.Reporting.TypeReportSource typeReportSource = new Telerik.Reporting.TypeReportSource(); // reportName is the Assembly Qualified Name of the report typeReportSource.TypeName = reportName; reportProcessor.PrintReport(typeReportSource, printerSettings);
Version Information
Supported in: 1.0.1