This is a migrated thread and some comments may be shown as answers.

Detecting Errors When Printing Programmatically

3 Answers 28 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shane
Top achievements
Rank 1
Shane asked on 07 Feb 2017, 04:01 PM

Hello,

I'm using the programmatic printing method described in this page. It's working so far, but is there a way to detect if the printing fails after calling the reportProcessor.PrintReport() method?

Thanks,

Shane

3 Answers, 1 is accepted

Sort by
0
Shane
Top achievements
Rank 1
answered on 07 Feb 2017, 06:41 PM
Wait, would putting the PrintReport() call in a Try and catching any exception that occurs work? Does a failed print throw an exception?
0
Accepted
Stef
Telerik team
answered on 10 Feb 2017, 10:41 AM
Hello Shane,

Once the document is processed, it is submitted to the printer machine.  If there are error during the processing, they can be caught in the ReportProcessor's Error event. The tasks of the printer machine are out of the scope of the reporting engine.


If you prefer, you can export programmatically the report and print it with custom code e.g. export in XPS and print XPS documents. The approach will give you control over the printer tasks.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shane
Top achievements
Rank 1
answered on 10 Feb 2017, 12:57 PM

Hi Stef,

Thanks for the information. I'll try out a couple methods.

Shane

Tags
General Discussions
Asked by
Shane
Top achievements
Rank 1
Answers by
Shane
Top achievements
Rank 1
Stef
Telerik team
Share this question
or