[SOLVED] Automatic Printing of Alerts or Reports

I know in the past it was not possible to automatically print a report without having a client open. Is that still the case, or has there been a change to that. Ideally I would like to print a report every time it is generated automatically.


In the new reporting (7.8+), reports are generated on the gateway so no client needs to be open. You can schedule the reports to be distributed automatically (email, save, print, ftp or script) or run them via a script. docs

Thanks Kathy. Forgot that was added. It’s tough to keep up with all the changes when most of my time is spent just getting projects done…

Anyway. Running into a Windows issue. When I run this function (after I have the report defined and working the way I want) in a Script Console (From designer on the server):
system.report.executeAndDistribute(path=“Report”, action=“print”, actionSettings = {“primaryPrinterName”:“default”})

I get a Java Error:
java.awt.print.PrinterException: No print service found.

Which we think (working with your support folks) is because the Local System doesn’t have access to any network resources. So we tried starting the Ignition service as a user (with admin rights to the Ignition server) and we get a “Windows could not start the Ignition Gateway on Local Computer… refer to service-specific error code -1.”

I could probably pop this on a linux server (You and I are both fans of that option, but my IT server people, not so much), and have it work, but really running into a roadblock here.

Check the very end of the wrapper.log file in Program Files/Inductive Automation/Ignition/logs to see if there’s a better indication of why the service is failing to start.

1 Like

For anyone that sees this in the future.

After much experimentation it was determined that we need to start the Ignition Gateway service on the windows server as a user that has Administrative rights to that server to be able to send a report. A Standard user did not work (same error as above), as well as the default Local System as the service is initially installed.

I also logged in as that user and setup a printer as default. It all seems to work.

Here is the report function I am calling in a tag change script to call the report:

system.report.executeAndDistribute(path=“Report”, project=“Project” action=“print”, actionSettings = {“primaryPrinterName”:“default”})

Hopefully this helps someone else.