# Detect if report generates or not from tag change event

**URL:** <https://forum.inductiveautomation.com/t/detect-if-report-generates-or-not-from-tag-change-event/92370>\
**Category:** Ignition\
**Tags:** ignition81, reporting, scripting\
**Created:** [June 25, 2024, 11:11pm UTC](https://forum.inductiveautomation.com/t/detect-if-report-generates-or-not-from-tag-change-event/92370 "2024-06-25T23:11:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASG\_Nic](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@ASG\_Nic](https://forum.inductiveautomation.com/u/ASG_Nic)\
**Post date:** [June 25, 2024, 11:11pm UTC](https://forum.inductiveautomation.com/t/detect-if-report-generates-or-not-from-tag-change-event/92370/1 "2024-06-25T23:11:36Z")

</div>

In my project I have a gateway tag change event script that calls a client tag change event script to generate reports. I want to add a check that these reports actually generate as i've been having some not generate.

Basic logic:

tag 1 change -\> gateway script sets tag 2 -\> client script generates report and resets tag 2.

Is there a way to detect if tag 2 is not reset in a given time? Im not sure the best way to do this.

thankyou!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 26, 2024, 3:01am UTC](https://forum.inductiveautomation.com/t/detect-if-report-generates-or-not-from-tag-change-event/92370/2 "2024-06-26T03:01:14Z")

</div>

Why are you using a client tag change event? Reports run in the gateway, even if called from a client context.

---

<div class="post-metadata">

**Author:** ![ASG\_Nic](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@ASG\_Nic](https://forum.inductiveautomation.com/u/ASG_Nic)\
**Post date:** [June 26, 2024, 3:13am UTC](https://forum.inductiveautomation.com/t/detect-if-report-generates-or-not-from-tag-change-event/92370/3 "2024-06-26T03:13:33Z")

</div>

when i generate the report i am also saving a pdf of the report to the client.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 26, 2024, 11:15am UTC](https://forum.inductiveautomation.com/t/detect-if-report-generates-or-not-from-tag-change-event/92370/4 "2024-06-26T11:15:18Z")

</div>

And if the client isn't running? Or is stuck on a modal popup?

I recommend you run the report from the gateway, and store it in the gateway. Use a message handler called from the client, at the client's convenience, to retrieve and save the most recent report.
