Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
One useful feature of a reporting tool is to receive an email when a condition is met in your data (e.g. receiving an email if if a status has not been updated or if a count or a sum is not as expected). This could be simply done by: - create a report that would return records only if the alert must be sent (use either the SealMasterTable to enter your SQL or a pre-defined Data Source).
- create a model and a view to show these records
- create an Email Output for your report (assuming you have already a EMail SMTP Device already defined with the Server Manager)
- In the Output definition, set the option 'Cancel Generation if no Records' to True
- Finally, define a schedule for this output, the check could be done every 5mn, day, month depending on your needs
The email will be sent only if the report execution returns records. More complex conditions can be also specified by using the Pre-Generation script of the Output: A Razor script can be used: if the result string of the script is 0, the generation is aborted. e.g. The following script can be used in the Pre-Generation for the output: Quote:@using Seal.Model @{ ReportOutput output = Model; string result = "1"; if (output.Report.HasErrors) { result = "0"; } } @result Edited by user Monday, January 20, 2014 8:06:05 AM(UTC)
| Reason: Not specified
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.