Email Report Tools

Previous  Top  Next


Configuration > Reports > Email Report Notifications > Email Report Tools

CISPro Global offers several ways to make the process of creating Flex and Targeted email reports easier, especially for users with  limited (or no) SQL knowledge or report building experience.

Use Dynamic Reports to Generate Query Text for Reports

Users who are not proficient in SQL can use existing Dynamic Reports (which are used for secure reports) as aids in creating the SQL text for Flex and Targeted Reports. As explained in Dynamic Reports, the SQL query text that is used for these reports is displayed on the report setup page.

1.On the System Configuration page, click Dynamic Reports
2.Create a new report containing all of the information that the Flex or Targeted Report recipients should see

Note: See Dynamic Reports for help on creating the report.

3.When the Dynamic Report configuration is complete, copy the contents of the Report SQL text box at the bottom of the page
4.Paste the copied report SQL text into the Query Text box on the Flex or Targeted Report
5.Make changes to other Flex or Targeted Report fields as needed (e.g., the Data Row will need to include fields referenced in the Query Text)
6.Save the report

 

Every Dynamic Report (user-created and standard pre-prepared reports alike) has a Report SQL box from which the SQL Query can be copied and used to configure a Flex or Targeted email report.

Report Macros

Report macros are provided as a kind of shorthand to "plug in" information users commonly need in preparing No-Login-Required (Flex and Targeted) email reports. Supported Report Macros include:

{reportname} Used to place the Report Name into the subject, or any header/footer section.

{currentdate} Used to place the date the report is generated into the subject, or any header/footer section.

{username} Decodes the recipient's email address to a username for any user in the CISPro USERS table. Can be used in the subject, header/footer, or query sections.

{userid} Decodes the recipient's email address to a userid value for any user in the CISPro USERS table. Can be used in the subject, header/footer, or query sections.

{workunitid} Decodes the recipient's email address to a workunitid value for any user defined in the CISPro USERS table. Can be used in the subject, any header/footer, or query sections.

{siteid} Decodes the recipient's email address to a siteid value for any user defined in the CISPro USERS table. Can be used in the subject, any header/footer, or query sections.

{crlf} Puts a line break in the output. Can be used in any header, footer, or data row.

{tab} Puts a tab in the output. Can be used in any header, footer, or data row.

Of course, for the system to be able to locate information about the username, userid, work unit and site of a report recipient, the recipient's email address must exist somewhere in the Users table.

More Report Variables

The examples above showed some typical ways in which the {reportname}, {currentdate}, {tab} and {crlf} macros can be used in an email report. In addition, when a variable name (i.e., a data item like "materialname") is included in the Query Text, that name can be surrounded by braces (curly brackets) to represent the actual values of that variable.

For instance, in a report whose query text contains the materials.materialname and materials.materialid fields, the Data Row edit box can contain {materialname} and {materialid} to represent the material names and IDs, which will make up the rows of the report. The outcome of using these variables in a report is shown here:

Report Design Data Row: {materialid} {materialname}
Generated Report Content: M204 Acenaphthene

The user context data may also be used to personalize the report when it's sent it to more than one individual. For example, the Report Header may look something like this:

{reportname} for User: {userid}, {username} in Work Unit: {work unitid}, and Site: {siteid} {crlf}

If the user receiving the email is Bob Fuller in work unit Laboratory1 at Site Eagle River, the header would look like this:

Material List for User: 149, Bob Fuller in Work Unit: Laboratory1, and Site: Eagle River

Reset 'Last Run' Date

Once the schedule for email report delivery is set as described above, and the Save button is clicked, the mail report delivery service queues the message(s) and will begin sending according to the schedule. This all happens behind the scenes. For convenience, the CISPro Global system keeps track of the number of times each email report has been sent as well as the last sending date. The Last Run value can be reset, in which case the report will begin running again per its schedule.

1.On the System Configuration page, click Email Report Notifications
2.Select an Email Report
3.Click the Clear button in the Last Run row

Send Frequency Options

The send frequency controls how often the email notification is sent, and can be set to daily, every Thursday, the 3rd of every month, etc.

Send When = Every (n) days: The report will be sent every N days, such as every day (N=1) or once a week (N=7).

Send When = Every (day#) of week: The report will be sent on a specific day of the week. Each day is numbered: Sunday =1, Monday =2, etc. (Hint: To send a report 5 days a week (i.e., every weekday), create 5 schedules for the same report, one for each day.)

Send When = Every (day#) of month: The report will be sent on a specific day of the month. To send a report 2 or more days per month, create one schedule for each day it should be sent, for example the 1st and 15th.

Day of Week Numbers

The numbers used to represent days of the week in CISPro Global are shown below.

 

Day                Number

Sunday        1

Monday        2

Tuesday        3

Wednesday        4

Thursday        5

Friday        6

Saturday        7