Batching of burst report output for delivery by email using Event

advertisement
Batching of burst report output for delivery by email.
This document explains how several burst report outputs may be batched together and delivered to a
recipient as multiple attachments to a single email. It also shows how to merge data into the subject line
of the email.
Preamble - Bursting is the process of running a report once and dividing the output into subsets for
distribution. Each recipient receives only that part of the data that is relevant to them. For example, sales
managers in different regions each need a report showing the sales figures for their own territory. You
can create a sales report and burst its output by sales territory, emailing the appropriate section to each
sales manager. Instead of emailing, you can choose to save the burst output to a specific directory for
subsequent viewing in Cognos Connection. But, for the rest of this document, we’ll assume that email
delivery has been chosen.
Bursting a report requires 2 ‘keys’ – a ‘burst’ key, which specifies how the report will be divided (by sales
territory in this example) and a ‘recipients’ key that specifies how the report sections will be distributed.
For full information about report bursting, see the Report Studio Professional Authoring User Guide.
Bursting is such a useful technique that recipients may find themselves receiving numerous emails every
week or month, each containing some component of their periodic status reports. Normally, you run
multiple reports together by including them in a job. For each report in the job you select the Bursting
option:
And, to initiate email delivery, you select the ‘Send a link to the report by email’ option. Editing this option
allows you to specify that the report be sent as an email attachment:
Note that you do not need to specify the recipient for a burst report; this is determined by the report’s
burst specification.
Now, as each report in the job is run, its various outputs will be emailed to their respective recipients. But
this may result in some users receiving multiple emails, each containing a single report. So, how can you
collect the outputs of all these reports and send them together in a single email?
An alternative to running multiple reports in a job is to include them in an Event Studio agent. An agent
can contain multiple report tasks, each running a single report. You can also create an email task and
attach the results of the various report tasks to the email. And you can address an email ‘dynamically’ by
dragging a data item containing an email address to the Recipient field – which causes an email to be
sent to each person in the list. By combining all these features, you can send one email to each person
containing the burst outputs of multiple reports.
Method – Open Event Studio and choose the package that contains your recipient list.
Defining a Condition – In Event Studio, you define a condition which is evaluated when the agent runs. If
the condition evaluates to ‘true’ - that is, there are data items that meet that condition - the agent performs
its tasks using those data items. In this example, we’ll assume that reports will be sent to all sales staff
who have a sales target. This avoids sending ‘empty’ emails to staff who have no sales target:
Adding Report Tasks – Now you can create report tasks to run each of your burst reports. In the I want
to… pane, click Add a task and then select Run a report… Select the first of your reports. Click the
Set… link and override the default run options:
Select the Burst the reports checkbox but do not select Send the report by email (this will be done by
an email task). Click OK to save the options.
Create more report tasks and set the options as above for each report you wish to run.
Adding an Email Task - In the I want to… pane, click Add a task and then select Send an email… If
there is an entry in the To: field, delete it. Now drag the data item that represents your recipients’ email
addresses from the Insertable objects area to the To: field of the email (this is the same data item used
to define the recipients key in the reports’ burst options). Add a Subject: line. The example below shows
a ‘dynamic’ subject, utilizing data from the package. Click the drop-down control by the Attach link under
the email body and attach the output of each report:
Save the agent and then run it.
The agent executes its tasks. It firstly runs the reports and saves the burst report outputs. It then creates
an email to each of the recipients and includes the relevant outputs from each of the burst reports. Here
is the resulting email to one of the recipients, Donald Chow. He receives a single email with three reports
containing only data relevant to him:
Note that the subject includes the data from the package. Because no text was entered in the email
body, the first report is displayed ‘in-line’ within the email; the remaining reports are included as
attachments. If some text had been entered within the email body, then all three reports would have been
attached.
Download