Automatically Generating Reports

Hi All,

I'm hoping to get some feedback on a feature we'd like to add to our Vision project, before we commit to it and potentially run into some major obstacle that we missed.
We currently have a window on our Vision client which allows users to enter a list of tag paths and have them populated into a chart component in order to view trends for any tag with history. We'd like to extend that capability by allowing users to save that list of tags and to schedule a report to be sent to them daily with trends for each of the tags.
Our initial idea was to save the report information (tag paths, user, emails, etc.) to the gateway database, and then use a gateway event and the executeAndDistribute system function to send out each report. The report would be populated from the tag paths stored in the database.
Does anyone have any experience using gateway scripts for generating reports like this? We are a bit concerned about the reliability of the function as well as potentially impacting gateway performance. We do plan to limit the size of the reports and stagger the times they are sent out, but we have had reliability issues with reports in the past.

Any info or ideas would be greatly appreciated, thanks!

Use a single gateway scheduled event.

Run all of your reports per day in that single script thread, so you don't have multiple reports being generated simultaneously.

Sounds like a fine plan.

2 Likes

You can always create a log history table in the database to provide insight on execution (or set up an email alert at the end of the script) for that additional peace of mind.

We've done similar in the past. We also included a front end piece to "re-generate" the report as well just in case so the client could be self-sufficient.

1 Like