logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
epf  
#1 Posted : Monday, January 13, 2014 6:55:30 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

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:
  1. 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).
  2. create a model and a view to show these records
  3. create an Email Output for your report (assuming you have already a EMail SMTP Device already defined with the Server Manager)
  4. In the Output definition, set the option 'Cancel Generation if no Records' to True
  5. 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

Users browsing this topic
Guest (2)
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.