# Printing Report With Button

**URL:** <https://forum.inductiveautomation.com/t/printing-report-with-button/9307>\
**Category:** Ignition\
**Created:** [November 7, 2014, 7:55pm UTC](https://forum.inductiveautomation.com/t/printing-report-with-button/9307 "2014-11-07T19:55:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jreynolds](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jreynolds](https://forum.inductiveautomation.com/u/jreynolds)\
**Post date:** [November 7, 2014, 7:55pm UTC](https://forum.inductiveautomation.com/t/printing-report-with-button/9307/1 "2014-11-07T19:55:10Z")

</div>

I’m trying to print a report with a button on the screen, this is what I have so far.

`report = event.source.parent.getComponent('Report Viewer')
report.showPrintDialog=0
report.print()`

When I run this code it prints a screen shot of the page. I want it to print the report not a screen shot.

I’ve also tried it this way, but get the same result.

`report = event.source.parent.getComponent('Report Viewer')
job = system.print.createPrintJob(report)
job.showPrintDialog=0
job.print()`

If I run it this way it works, but I get the Print dialog box. I would like to do this without using the print dialog box.

`report = event.source.parent.getComponent('Report Viewer')
report.print()`

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [November 7, 2014, 8:50pm UTC](https://forum.inductiveautomation.com/t/printing-report-with-button/9307/2 "2014-11-07T20:50:24Z")

</div>

There’s an example of this in the manual:

`# This would print to the default printer with no user interaction
report = event.source.parent.getComponent("Report Viewer")
report.print(None, 0)`

[support.inductiveautomation.com … viewer.htm](https://support.inductiveautomation.com/usermanuals/ignition/reporting_components_reportviewer.htm)

---

<div class="post-metadata">

**Author:** ![jreynolds](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jreynolds](https://forum.inductiveautomation.com/u/jreynolds)\
**Post date:** [November 7, 2014, 8:53pm UTC](https://forum.inductiveautomation.com/t/printing-report-with-button/9307/3 "2014-11-07T20:53:30Z")

</div>

Awesome, this works great! Thanks.

---

<div class="post-metadata">

**Author:** ![Esmeralda\_Lopez](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@Esmeralda\_Lopez](https://forum.inductiveautomation.com/u/Esmeralda_Lopez)\
**Post date:** [January 5, 2023, 6:09pm UTC](https://forum.inductiveautomation.com/t/printing-report-with-button/9307/4 "2023-01-05T18:09:06Z")

</div>

And if I want to print in a especific printer?

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [January 5, 2023, 8:39pm UTC](https://forum.inductiveautomation.com/t/printing-report-with-button/9307/5 "2023-01-05T20:39:38Z")

</div>

Since this is an old topic you should either create a new topic or flag your question as vision or perspective.

---

<div class="post-metadata">

**Author:** ![Esmeralda\_Lopez](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@Esmeralda\_Lopez](https://forum.inductiveautomation.com/u/Esmeralda_Lopez)\
**Post date:** [January 5, 2023, 8:41pm UTC](https://forum.inductiveautomation.com/t/printing-report-with-button/9307/6 "2023-01-05T20:41:16Z")

</div>

thanks, I will do it
