# \[SOLVED\] Automatic Printing of Alerts or Reports

**URL:** <https://forum.inductiveautomation.com/t/solved-automatic-printing-of-alerts-or-reports/15196>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [August 29, 2017, 6:04pm UTC](https://forum.inductiveautomation.com/t/solved-automatic-printing-of-alerts-or-reports/15196 "2017-08-29T18:04:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbackus](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tbackus/32/5091_2.png) [@tbackus](https://forum.inductiveautomation.com/u/tbackus)\
**Post date:** [August 29, 2017, 6:04pm UTC](https://forum.inductiveautomation.com/t/solved-automatic-printing-of-alerts-or-reports/15196/1 "2017-08-29T18:04:00Z")

</div>

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.

Thanks.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [August 29, 2017, 6:18pm UTC](https://forum.inductiveautomation.com/t/solved-automatic-printing-of-alerts-or-reports/15196/2 "2017-08-29T18:18:59Z")

</div>

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](https://docs.inductiveautomation.com:8443/display/DOC79/Report+Schedules)

---

<div class="post-metadata">

**Author:** ![tbackus](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tbackus/32/5091_2.png) [@tbackus](https://forum.inductiveautomation.com/u/tbackus)\
**Post date:** [August 30, 2017, 5:35pm UTC](https://forum.inductiveautomation.com/t/solved-automatic-printing-of-alerts-or-reports/15196/3 "2017-08-30T17:35:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 30, 2017, 7:05pm UTC](https://forum.inductiveautomation.com/t/solved-automatic-printing-of-alerts-or-reports/15196/4 "2017-08-30T19:05:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tbackus](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tbackus/32/5091_2.png) [@tbackus](https://forum.inductiveautomation.com/u/tbackus)\
**Post date:** [August 31, 2017, 12:07pm UTC](https://forum.inductiveautomation.com/t/solved-automatic-printing-of-alerts-or-reports/15196/5 "2017-08-31T12:07:55Z")

</div>

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.
