14.3 Generate a Report Using a Report Tag

In the previous exercise, you generated a one-time report using the Reports page. Report tags enable you to generate reports that can be triggered on any of the following conditions:

      Hourly at a user-defined time.

      Daily at a user-defined time.

      Weekly on a user-defined day and time.

      Monthly on a user-defined date and time.

      When the value of a selected tag changes.

In this exercise, you will configure a daily total report to trigger weekly every Monday at 7:00 am for the previous week.

 

1.  Click the Configure button to open the Configuration Toolbox.

2.  Click the Tag Browser button to open the Tag Browser.

3.  Select Report from the Types drop-down list.

4.  Click the New button. A new tag properties folder for a report tag will open.

5.  Enter the name "Daily_Tank_Levels" for the new report tag.

6.  Enter "Reports" for the area.

7.  Enter "Daily Holding Tank Level Report" in the Description field.

8.  Set the report type to "Daily Total Report" from the Report Type drop-down list. ()

Figure 177

9.  Click the Tag tab.

10. Select "AI20_1 Booster Tank Level" in the Tags Available list.

11. Click the > button to move the selected tag to the Tags in Report list. ()

Figure 178

12. Click the "Save Group" button.

The Save Group dialog will open.

13. Enter a name followed by the extension .grp in the File Name field of the Save Group dialog (e.g. "BoosterTankLevel.grp").

14. Click the Save button to save the new tag group.

15. Click the Period tab.

16. Select Last Week in the Presets drop-down list.

Figure 179

17. Click the Trigger tab. (Figure 180)

18. Select the Weekly On radio button.

19. Set Mon 7:00 am as the weekly trigger day and time.

20. Check that the name of your workstation is in the Workstation field.

Figure 180

21. Click the Destination tab. (Figure 181)

Figure 181

22. Select Text File from the Output Type drop-down list.

23. Enter the full path to which you wish the report to be saved in the Path field (e.g. "C:\VTS\Tutorial\MyReports\"). It is recommended that you make this path relative to your application directory, so that all of your application's data is kept together. If the directory you specify does not exist, one will be automatically created for you.

24. Click the OK button. The new report tag will be saved.

25. Close the Tag Browser.

26. Close the Configuration Toolbox to place the application back into operational mode.

A report will now be created every Monday at 7:00 am. This report will include the daily accumulated booster tank level value at 7:00 am every day for the previous week. The report will be saved to the directory you specified, and will be in a formatted text file.

Note: Should you wish to test your report tag, re-open it, change the report trigger to Daily, change the trigger time to two or three minutes past the current time, then click the OK button to save the modifications to the tag. A report should be generated for you at the specified time in the specified location.

More information on the Reports page and report tags can be found in the VTS Developer's Guide.