# Generate report when a tag reaches a value

**URL:** <https://forum.inductiveautomation.com/t/generate-report-when-a-tag-reaches-a-value/61243>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [June 27, 2022, 3:03pm UTC](https://forum.inductiveautomation.com/t/generate-report-when-a-tag-reaches-a-value/61243 "2022-06-27T15:03:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Israel\_Martinez\_Morr](https://avatars.discourse-cdn.com/v4/letter/i/a4c791/32.png) [@Israel\_Martinez\_Morr](https://forum.inductiveautomation.com/u/Israel_Martinez_Morr)\
**Post date:** [June 27, 2022, 3:03pm UTC](https://forum.inductiveautomation.com/t/generate-report-when-a-tag-reaches-a-value/61243/1 "2022-06-27T15:03:24Z")

</div>

Hello, I would like to know if anyone knows if it is possible to generate an automatic report when a tag reaches a certain value. For example, if in a tag I am having a reading of values ​​but the reading drops to 0, a pdf report is generated. I was watching the videos of the course but I couldn’t find how to do it.  
thanks

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [June 27, 2022, 3:05pm UTC](https://forum.inductiveautomation.com/t/generate-report-when-a-tag-reaches-a-value/61243/2 "2022-06-27T15:05:27Z")

</div>

Gateway tag I am assuming?

Make a gateway tag change event on that tag. Then there you can do something like

```auto
if not initialChange and event.newValue < 0:
    # Make report logic

```

I think you’ll want this function for your report creation logic  
[https://docs.inductiveautomation.com/display/DOC79/system.report.executeAndDistribute](https://docs.inductiveautomation.com/display/DOC79/system.report.executeAndDistribute)

One potential issue with this approach I can see is if its possible where it bounces above zero and down over and over, it may make many reports in a short time. If that’s ok with you then nothing wrong with this approach.
