I have an WPF Application where one of the tasks in this application will be printing a telerik report which takes a little time.
I have solved the screen freeze by using BackgroundWorker, But I want showing printing process in ProgressBar, I have read some of examples but all of them talks about FOR loops and passes the integer number to the ProgressBar which is dose not work with my case.
How can I do that if this possible?
Here's my BackgroundWorker DoWork:
void _printWorker_DoWork(object sender, DoWorkEventArgs e)
{
_receiptReport = new Receipt(_invoice.InvoiceID, _invoice.ItemsinInvoice.Count);
printerSettings = new System.Drawing.Printing.PrinterSettings();
standardPrintController = new System.Drawing.Printing.StandardPrintController();
reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
reportProcessor.PrintController = standardPrintController;
instanceReportSource = new Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = _receiptReport;
reportProcessor.PrintReport(instanceReportSource, printerSettings);
}
Thanks in advance