Progress® Telerik® Reporting R1 2021
ReportProcessor.PrintController Property
Specifies a print controller to be used when printing a Report.
If a null value is specified, a default print controller is used,
which displays the Print Progress dialog.
Namespace:
Telerik.Reporting.ProcessingAssembly: Telerik.Reporting (in Telerik.Reporting.dll)
Syntax
Remarks
If you need a better control over the printing process, or simply
to customize the appearance of the print UI, you should specify
a custom print controller to this method.
Examples
This example shows how to customize the title of the Print Progress
dialog with a custom provided print controller.
To prevent the print UI from appearing, you should specify valid
printer settings and a standard print controller to this method.
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(); // Create a custom print controller based on the StandardPrintController with title: Print Progress System.Drawing.Printing.PrintController standardPrintController = new System.Drawing.Printing.StandardPrintController(); System.Drawing.Printing.PrintController customPrintController = new System.Windows.Forms.PrintControllerWithStatusDialog(standardPrintController, "Print Progress"); // Print the report using the custom print controller Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor(); reportProcessor.PrintController = customPrintController; Telerik.Reporting.TypeReportSource typeReportSource = new Telerik.Reporting.TypeReportSource(); // reportName is the Assembly Qualified Name of the report typeReportSource.TypeName = reportName; reportProcessor.PrintReport(typeReportSource, printerSettings);
Examples
This example illustrates how to prevent the print UI 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