# How do you refresh a Report Viewer component from a gateway script?

**URL:** <https://forum.inductiveautomation.com/t/how-do-you-refresh-a-report-viewer-component-from-a-gateway-script/36318>\
**Category:** Ignition\
**Created:** [July 2, 2020, 8:39pm UTC](https://forum.inductiveautomation.com/t/how-do-you-refresh-a-report-viewer-component-from-a-gateway-script/36318 "2020-07-02T20:39:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [July 2, 2020, 8:39pm UTC](https://forum.inductiveautomation.com/t/how-do-you-refresh-a-report-viewer-component-from-a-gateway-script/36318/1 "2020-07-02T20:39:35Z")

</div>

I have a Report Viewer component on my client which may or may not be open at the time the gateway script runs. If the client is open and the report viewer is showing how can I refresh the component?

Thank you for any help. My current gateway script is as follows:

```
if not initialChange:
    save = system.tag.read('[WELDER]DAILY_SAVE_PROGRESS_IGNITION').value
    if save == 1:
	    main.save_database()
	    system.tag.write('[WELDER]DAILY_SAVE_PROGRESS_IGNITION', 0)
```

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [July 3, 2020, 3:00am UTC](https://forum.inductiveautomation.com/t/how-do-you-refresh-a-report-viewer-component-from-a-gateway-script/36318/2 "2020-07-03T03:00:11Z")

</div>

Add another parameter to the report and bind it to the tag above. Or create a custom property on that window that is bound to the tag above and add a property change script to refresh binding on the report component.

---

<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:** [July 3, 2020, 2:59pm UTC](https://forum.inductiveautomation.com/t/how-do-you-refresh-a-report-viewer-component-from-a-gateway-script/36318/3 "2020-07-03T14:59:49Z")

</div>

I would not use another report parameter. Instead, I would use system.util.sendMessage to broadcast the need to refresh the report. The client message handler would locate the appropriate window and if open, trigger the report refresh on the viewer component. (Assign to any report parameter, even with the same value, to trigger report refresh.)
