event setup – e-mail report studio report to users
TRANSCRIPT
Event setup – E-mail Report Studioreport to usersBy Murali Sunkara, IBM India
This technique uses Report Studio and Event Studio features to e-mail the
output from a report attachment to users only if data is available.
This technique was validated using IBM Cognos 8.4.1 using the GO Sales
(query) package. The GO Sales (query) sample data was restored to a SQL
Server database. Also, this technique uses the SQL Server getdate()
function and will need to be modified if the sample data is restored to
another database such as DB2.
Since the GO Sales (query) sample data does not include dates up to
today’s date, in order to test this technique it is necessary to add a record
to some of the tables in the GO Sales (query) sample data.
1. Add a record to the TIME_QUARTER LOOKUP table. Only the
QUARTER_KEY column needs to be populated. For example, for
October 2010 the column should have a value of 20104 since October is in
the 4th quarter.
2. Add a record to the TIME_DIMENSION table. Only the
DAY_KEY, DAY_DATE, CURRENT_YEAR, QUARTER_KEY and
MONTH_KEY columns need to be populated.
Adding these records will generate a blank report that will be emailed. If
you want the report to contain data then some of the other tables will need
to be updated.
Scenario
Report Studio report scheduled every day that e-mails report output
attachments to users. Sometimes there is no data in the database for these
reports but an e-mail with zero byte file attachments is still being delivered
to users.
Business Expectation
If data is available for the report then send an e-mail with report output
attachments, otherwise, do not send an email.
Solution
Create an event in Event Studio. If the condition is true, then run report as a
task and send e-mail to users with report output.
Create a Report Studio report
The following report created to generate daily return quantities information.
This report output will deliver to users, if return quantities exists. The
query items are taken from the query subject Returned items (query).
ONLY 3 WEEKS AWAY!
Business Analytics
Forum @ Information On
Demand
October 24-27, 2010
Mandalay Bay, Las
Vegas, Nevada
Register now!
BA Forum
Exclusive Cognos
discount saves you $500!
Register with
promotional code
D10COGNOS to
receive a discount
available only to IBM
Cognos customers.
Register now!
IBM - http://www-148.ibm.com/bin/newsletter/tool/landingPage.cgi?lpId=3282
1 of 5 22/01/2011 16:54
Create a filter to show the returned items from today. The filter is:
convert(varchar(10),[Returned items (query)].[Time dimension].
[Date],101)=convert(varchar(10),getdate(),101)
Save the report as Daily - Return Quantity.
Create an event in Event Studio
1. Open GO Sales (query) model in Event Studio and specify an event
condition as follows:
convert (varchar(10), [Date] ,101)=convert (varchar(10),getdate(),101)
In this instance, [Date] maps to the query item from [Returned items
(query)]. [Time dimension]. [Date]
2. Validate the event condition. If this event condition is true, then run the
IBM - http://www-148.ibm.com/bin/newsletter/tool/landingPage.cgi?lpId=3282
2 of 5 22/01/2011 16:54
Daily - Return Quantity report.
3. Click Add a task > Run a report.
4. Select the new report.
5. Select the options and override the default values. Select Format as
PDF and select the Send the report by email check box. Add the email
recipients. Click OK.
IBM - http://www-148.ibm.com/bin/newsletter/tool/landingPage.cgi?lpId=3282
3 of 5 22/01/2011 16:54
6. Select Manage the Task execution rules and select the New events
check box and click OK.
IBM - http://www-148.ibm.com/bin/newsletter/tool/landingPage.cgi?lpId=3282
4 of 5 22/01/2011 16:54