Printing Report

I’m using the function system.report.executeAndDistribute() to print a report using a trigger. Is there a way of finding out if the print job successfully completed? or if the action failed? For example: printer runs out of toner/paper or is not connected.

Short answer: no.

Java’s printing functions don’t return success or failure, so we don’t have a way to find out and get that info back to you. Some users will do both a print and a save so they can reprint later in case of failure – not ideal, but I haven’t heard of a better solution.

I know this thread is a little old but I had a related question.
Can the scheduled printing of reports or triggered printing using system.report.executeAndDistribute() be done with a PDF printer driver?
I’m trying to do some testing on a server based development VM that has no printer access. I’ve installed a PDF printer driver and set it as the Default printer. Unfortunately it isn’t working.
In the same report schedule I have a “save” configuration that does work, so I know the scheduled event is triggering.
I can also successfully use the system.report.executeAndDistribute() to save as a PDF.
I’m just trying to see if my test concept even holds water before I install everything on a local VM or directly on my laptop.

Yes, it can - but, assuming you’re on Windows, you may need to jump through some hoops to make the PDF printer driver available to the actual “user” running the Ignition service (unless you’ve specifically changed it, it will be LOCAL_SERVICE) - by default, “user” printer configurations are not shared with other accounts, even on the same machine.

2 Likes