# Need to get a PDF report to generate based on a trigger other than scheduled time

**URL:** <https://forum.inductiveautomation.com/t/need-to-get-a-pdf-report-to-generate-based-on-a-trigger-other-than-scheduled-time/71119>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [March 15, 2023, 9:21pm UTC](https://forum.inductiveautomation.com/t/need-to-get-a-pdf-report-to-generate-based-on-a-trigger-other-than-scheduled-time/71119 "2023-03-15T21:21:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Eubanks](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Michael\_Eubanks](https://forum.inductiveautomation.com/u/Michael_Eubanks)\
**Post date:** [March 15, 2023, 9:21pm UTC](https://forum.inductiveautomation.com/t/need-to-get-a-pdf-report-to-generate-based-on-a-trigger-other-than-scheduled-time/71119/1 "2023-03-15T21:21:47Z")

</div>

Hello,  
I've got a reporting module issue. I've got a client with a production testing policy that has inconsistent start and end times. Is there a way to have the report generator run on a trigger rather than at a specific time every day?

I've got all the data I need as OPC tags including the flag that signals the start or end of a test. If I can get it to just look at an item and run after that value turns to a 1 then that would be perfect, but the scheduling tab of the report builder seems to only work off of timestamps.

If it's impossible then I could just pull the needed data into a table, and have an event script export it as an excel file whenever I need. However I'd prefer to keep the more flexible formatting of exporting as a PDF.

Any help would be appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [March 15, 2023, 9:27pm UTC](https://forum.inductiveautomation.com/t/need-to-get-a-pdf-report-to-generate-based-on-a-trigger-other-than-scheduled-time/71119/2 "2023-03-15T21:27:52Z")

</div>

You can use [system.report.executeAndDistribute](https://docs.inductiveautomation.com/display/DOC79/system.report.executeAndDistribute) to run the report in a [tag change event](https://docs.inductiveautomation.com/display/DOC79/Client+and+Gateway+Event+Scripts#ClientandGatewayEventScripts-TagChangeScripts). It's more manual than the Scheduling tab, but you get more flexibility.

---

<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:** [March 15, 2023, 9:28pm UTC](https://forum.inductiveautomation.com/t/need-to-get-a-pdf-report-to-generate-based-on-a-trigger-other-than-scheduled-time/71119/3 "2023-03-15T21:28:59Z")

</div>

You can use a tag change script that generates the report -- check out [system.reporting in the docs](https://docs.inductiveautomation.com/display/DOC81/system.report.executeAndDistribute).
