Hi, here is the simple code:
What is the best practice: to create the report processor and controller each time a doc is printed in background (for instance if it's kinda printing manager, and it receives requests to print from different apps), or better to instantiate the both classes once on the app start up and then just call Print Report?
Is it ok if several Print controllers and processors are active and several threads?
The idea is simple.. if we have the intensive doc-to-print feedback, then what's the better way to be sure the general App is not hanging on while printing is not over?
Thank you!
void
ReportToDefault(Report report)
{
if
(report ==
null
)
return
;
System.Drawing.Printing.PrintController standardPrintController =
new
System.Drawing.Printing.StandardPrintController();
Telerik.Reporting.Processing.ReportProcessor reportProcessor
=
new
Telerik.Reporting.Processing.ReportProcessor();
reportProcessor.PrintController = standardPrintController;
try
{
reportProcessor.PrintReport(report, Properties.Settings.Default.defaultPrinter);
}
catch
(Exception ex) { MessageBox.Show(ex.Message); }
}
What is the best practice: to create the report processor and controller each time a doc is printed in background (for instance if it's kinda printing manager, and it receives requests to print from different apps), or better to instantiate the both classes once on the app start up and then just call Print Report?
Is it ok if several Print controllers and processors are active and several threads?
The idea is simple.. if we have the intensive doc-to-print feedback, then what's the better way to be sure the general App is not hanging on while printing is not over?
Thank you!