# 7.8 Report Printing

**URL:** <https://forum.inductiveautomation.com/t/7-8-report-printing/10669>\
**Category:** Ignition\
**Created:** [October 26, 2015, 1:07pm UTC](https://forum.inductiveautomation.com/t/7-8-report-printing/10669 "2015-10-26T13:07:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSI600](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DSI600](https://forum.inductiveautomation.com/u/DSI600)\
**Post date:** [October 26, 2015, 1:07pm UTC](https://forum.inductiveautomation.com/t/7-8-report-printing/10669/1 "2015-10-26T13:07:31Z")

</div>

I know we can schedule a new report to print.

Is there a way to auto print the report on a trigger and ignore the schedule?

---

<div class="post-metadata">

**Author:** ![DSI600](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DSI600](https://forum.inductiveautomation.com/u/DSI600)\
**Post date:** [October 26, 2015, 3:30pm UTC](https://forum.inductiveautomation.com/t/7-8-report-printing/10669/2 "2015-10-26T15:30:09Z")

</div>

Below is the code I am trying - but in the console I get an error “No Print Service Found”

#This will print the current report when the button is pushed.  
settings = {“copies”:1, “printBothSides”:True, “collate”: True}  
system.report.executeAndDistribute(path=“Report1”, project=“TestReports”, action= “print”, actionSettings = settings)

---

<div class="post-metadata">

**Author:** ![PerryAJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/perryaj/32/3281_2.png) [@PerryAJ](https://forum.inductiveautomation.com/u/PerryAJ)\
**Post date:** [October 26, 2015, 3:42pm UTC](https://forum.inductiveautomation.com/t/7-8-report-printing/10669/3 "2015-10-26T15:42:08Z")

</div>

Yes, you can use the system.report.executeAndDistribute() script function to print from a script:

[docs.inductiveautomation.com:84 … +Functions](https://docs.inductiveautomation.com:8443/display/DOC/Report+Module+Scripting+Functions)

edit: whoops, posted before I saw your followup. I assume you are able to print ok outside of the script?

edit 2: Doesn’t look like you have named a printer to print to in your settings. Take a look at the script function documentation, try setting the value for “primaryPrinterName”. Your system may not be picking up the default correctly.

---

<div class="post-metadata">

**Author:** ![DSI600](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DSI600](https://forum.inductiveautomation.com/u/DSI600)\
**Post date:** [October 26, 2015, 3:55pm UTC](https://forum.inductiveautomation.com/t/7-8-report-printing/10669/4 "2015-10-26T15:55:16Z")

</div>

I tried that as well before I posted. I took it out to see if it would just print to the default printer -

Should the printer name be exactly what it is in Windows “Device and Printers”

---

<div class="post-metadata">

**Author:** ![PerryAJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/perryaj/32/3281_2.png) [@PerryAJ](https://forum.inductiveautomation.com/u/PerryAJ)\
**Post date:** [October 26, 2015, 3:59pm UTC](https://forum.inductiveautomation.com/t/7-8-report-printing/10669/5 "2015-10-26T15:59:53Z")

</div>

It’s going to be the same as whatever the Gateway has. Remember that these scripts are run as Gateway services, so you want to make sure that whatever printer you are trying to use is available to your gateway.
