Create History Report
Create History Report
We have created a Create History Report tool that allows the user to query for points and create a job that will email a CSV file containing the points' history on a one-time, daily, weekly, or monthly basis.
Prerequisite:Â
You'll need the finHtmlReporting pod and have it enabled. Refresh browser after enabling.
You'll also need to have the Email SMTP settings configured in the Host > Settings . Then make sure a user has a valid email to receive the reports.
Large File
If you have a large database, you might want to double check the job status and logs to see if the report gets generated after creating it. There might be a chance depending on how many points and history is being reported, that the report won't be emailed due to the large file size. For example, Gmail can't email if files exceed 25MB. You may want to double check with your email service provider on what their limit is. You might have to create multiple reports to split it up and/or increase intervals so that less history is reported.
The report will still be generated in the background and can be found in the io folder in the directory. The user can then manually upload it to a cloud or some service like Dropbox that allows you to use a link to send your file.
How to use Create History Report
The user will go to the FIN Reports app.
Then, once inside the app, the user will select Create History Report.
Once selected, pop up window will appear.
The following options will be available:
Enter a title for the report: This will be the title of the report so user can easily identify it. This title will become the name of the job and will be part of the file name.
Enter a filter for points: Type in an axon query or use the Filter button to the right to select which points history should be gathered for.
Select a time frame for the history: This combo box contains options for the history time span.
History roll-up settings (optional): If user wants to specify roll up settings for points, then they can enable this by first checking the "Enable hisRollup" box. Then configuring the below fields.
Fold (optional): The user can specify how they want to fold the history whether by auto, min, max, or sum.
Interval (optional): The user can specify the interval at which they would like to collect the history for the report.Â
Set precision for decimals: The user can define the precision they would like to use for the numeric history values.
Select users to email the report to: This combo box contains available users with emails to have the report sent to.
Send the report: This comb box contains options for when to generate the report.
Organize Columns (optional): Checking this box will allow the user to organize the order of the columns of the history report.
Select a time frame for the history
This combo box contains the following options:
Today: This will gather the history for the current day.
Yesterday: This will gather the history for the previous day.
Current X: This will gather the history of the current X, where X can be week, month, or year.
Previous X:Â This will gather the history of the previous X, where X can be week, month, or year.
Select users to email the report to
This box will contain all the users with emails.
Send the Report
This combo box will contain the following options:
Now: This will not create a job, but will create the CSV file and email it once at that moment.
Daily: This will create a job to be ran on a daily basis.
Weekly: This will create a job to be ran weekly. If the original job was created on a Tuesday, then the report will be created and emailed every Tuesday.
Monthly:Â This will create a job to be ran monthly. The report will be created and emailed every 1st of the month at 9:00 AM.
Note: For the daily, weekly, monthly options, the user can modify the job that generates these reports and configure the frequency after its been created in case they changed their mind.
Organize Columns
After the user has filled out the "Create CSV History Report" form, if they have selected "Organize Columns" and clicked "Apply" the following pop up will appear:
This will list all the points that will be included in the History Report and allow the user to change the order.
For an exact order, make sure no numbers repeat.
For a more general order, the user may repeat the same numbers and those points will be next to each other. For example, all the points given a 1 will appear first before those with 2 or greater.
Once the desired order is added, the user will click the "Apply" button and a job (or report, if "Now" was selected) will be created.
Additional Information
Edit or Delete Jobs
To edit or delete the job created, the user can go into the Jobs app or DB Builder > Jobs tree. This also helps with debugging when a report doesn't get sent. The user would look at the job status and logs to see why its not going through.
The job can be identified by looking for the title given to the report.
Once open, they can view the frequency and func its running.
In DB Builder > Jobs tree, it looks something like this.
File Location
All reports generated by History Report can be found by going to the io folder of the project. Example: C:\Program Files (x86)\FIN Framework\FIN Framework v5.0.3.2725\var\proj\demo\io\CSV.
Each time a report is created it's naming scheme will be the title of the report followed by the date it was created. Example: My Report on 2015-10-20, My Report on 2015-11-20, ect.
Example Report
Below is an example of a history report. We called it "Example Report".
Â