IBM Cognos Proven Practices: IBM Cognos BI – Create a Custom Schedule Using Calculations and Parameters in Event Studio

Nature of Document: Tip or Technique; Product(s): IBM Cognos Event Studio; Area of Interest: Reporting

An approach to scheduling a report which can be delivered to users on multiple, non-recurring dates using an IBM Cognos Event Studio agent.

Share:

Selvakumar Gunasekaran , Consultant, Cognizant Technology Solutions

Selvakumar Gunasekaran has worked extensively with the IBM Cognos BI suite. He has provided BI Solutions for clients in banking and pharmaceutical domains. Selvakumar is an IBM Certified Developer (Cognos BI Metadata Models) and Designer (Cognos BI Reports).



06 February 2012

Introduction

Purpose

This document describes an approach to schedule a report which can be delivered to users on multiple, non-recurring dates using an IBM Cognos Event Studio agent.

Applicability

The following technique was tested with IBM Cognos 10.1 and 10.1.1.

Exclusions and Exceptions

At the time of the writing of this document, Event Studio was not supported in Mozilla Firefox.

Assumptions

This document assumes readers have experience with IBM Cognos BI, in particular IBM Cognos Report Studio and IBM Cognos Event Studio.


Overview

In many cases, report consumers need their reports automatically delivered by email. For recurring dates this can be done using IBM Cognos scheduling options, but within a single schedule, there is no option to schedule the report for multiple non-recurring dates. In these scenarios, consumers typically end up creating multiple schedules using multiple report views, which becomes cumbersome to maintain.

Let’s assume that the user wants the report to be delivered to their email inbox on the following non-recurring dates:

  • 04 Jan 2012
  • 09 Jan 2012
  • 13 Jan 2012
  • 17 Jan 2012
  • 25 Jan 2012
  • 30 Jan 2012

This document provides steps to schedule a report to run on non-recurring dates using calculations and parameters in an IBM Cognos Event Studio agent.


Create an Agent

  1. Open Event Studio and select a package.
  2. From the Insert menu, click Calculation....
    Illustration 1: The Insert menu with the Calculation item highlighted
    Illustration 1: The Insert menu with the Calculation item highlighted
  3. In the Define the data item screen, in the Name: field, type TODAY, and in the Expression: field box type current_date.
    Illustration 2: The Define the data item screen with the Name and Expression fields filled in
    Illustration 2: The Define the data item screen with the Name and Expression fields filled in
  4. Click OK.
    Next, you will insert a parameter.
  5. From the Insert menu, click Parameter....
    Illustration 3: The Insert menu with the Parameter item highlighted
    Illustration 3: The Insert menu with the Parameter item highlighted
  6. In the Parameter name: field, type Select the Schedule Dates:. The parameter name is case-sensitive.
    Illustration 4: The Define the parameter screen with the Parameter name field filled in
    Illustration 4: The Define the parameter screen with the Parameter name field filled in
  7. Click OK.
    Next, you will specify the event condition.
  8. On the Detail tab in the Expression box, enter the following expression exactly as shown.
    [TODAY] in (?Select the Schedule Dates:?)
    Illustration 5: The Event screen with the Detail tab selected and an expression defined in the Expression pane
    Illustration 5: The Event screen with the Detail tab selected and an expression defined in the Expression pane[TODAY] is the calculation just created, which can also be added to the expression from the Data Items tab under the Insertable Objects pane. ?Select the Schedule Dates:? is the parameter just created, which can also be added to the expression from the Parameters tab under the Insertable Objects pane.
    Next, you will insert the report to be run as a Task.
  9. From the Insert > Task menu, click Report....
    Illustration 6: The Insert menu with the Report item highlighted under the Task item
    Illustration 6: The Insert menu with the Report item highlighted under the Task item
  10. Click on the Select the report... link to select the report which has to be scheduled (in this case the report is titled Health Insurance) and then click OK.
  11. Under Options:, click the Set... link to specify the options for the report.
    Illustration 7: The Report task highlighting the Set link under Options
    Illustration 7: The Report task highlighting the Set link under Options
  12. Check the Override the default values option.
  13. In the Select the report options screen, under the Delivery: section, select Save the report and Send the report by email. Click the Edit the options... link beside the selected Send the report by email option.
    Illustration 8: The Select the report options screen showing the options to save the report and to send the report by email selected
    Illustration 8: The Select the report options screen showing the options to save the report and to send the report by email selected
  14. In the Set the email options screen, provide the recipients, the subject and email contents as per your requirements and ensure the Attach the report option is selected.
    Illustration 9: Set the email options screen for the selected report configured as required
    Illustration 9: Set the email options screen for the selected report configured as required
  15. Click OK to return to the Select the report options screen.
  16. De-select the HTML option and select the PDF option.
    Illustration 10: The Select the report options screen showing PDF as the only output format for the report
    Illustration 10: The Select the report options screen showing PDF as the only output format for the report
  17. Click OK.

Schedule the Agent

In this step you will set the schedule of the agent to run the report rather than using the report's schedule. This will allow you to leverage the event's expression containing the parameter you created and pass it the dates that you want the event condition to equal to true. When the event condition is true, then the report task will execute.

  1. From the Actions menu, click Schedule....
    Illustration 11: The Actions menu with Schedule item highlighted
    Illustration 11: The Actions menu with Schedule item highlighted
  2. In the Frequency: section, click the By Day tab and ensure the Every ‘1’ day(s) option is selected.
    Illustration 12: The agent's scheduled frequency of every 1 day(s)
    Illustration 12: The agent's scheduled frequency of every 1 day(s)
  3. Provide the schedule start and end dates as required. For this example, we will use Jan 3 2012 and Jan 31 2012 respectively.
    Illustration 13: The agent's scheduled start and end dates configured
    Illustration 13: The agent's scheduled start and end dates configured
    You will now provide prompt values for the agent.
  4. In the Prompt values section, check the Override the default values option, then click the Set... link.
    Illustration 14: Schedule's Prompt values section with Override the default values selected and the Set link highlighted
    Illustration 14: Schedule's Prompt values section with Override the default values selected and the Set link highlighted
  5. In the date prompt that appears on the Prompt screen, select the dates on which the report should be delivered to users. In this case we will use:
    • 04 Jan 2012
    • 09 Jan 2012
    • 13 Jan 2012
    • 17 Jan 2012
    • 25 Jan 2012
    • 30 Jan 2012
    Illustration 15: The Prompt screen with appropriate values selected on the calendar and added to the Choices pane using the Insert button
    Illustration 15: The Prompt screen with appropriate values selected on the calendar and added to the Choices pane using the Insert button
  6. Click OK to save the prompt values.
  7. Click OK to save the schedule.
  8. From the File menu, click Save to save the agent.

This Agent is now scheduled to run on a daily basis from Jan 3 2012 to Jan 31 2012. The event condition will only be satisfied on the dates specified in the prompt values and therefore the report output will be delivered through email to users' mailboxes on those dates.

As needed, the prompt values for the agent can be modified to meet the needs of the custom schedule. To do that, you can either open the agent in Event Studio and edit the prompt values in the schedule, or in IBM Cognos Connection, click the Schedule icon for the agent and edit the prompt values there.

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Big data and analytics on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Big data and analytics, Information Management
ArticleID=791800
ArticleTitle=IBM Cognos Proven Practices: IBM Cognos BI – Create a Custom Schedule Using Calculations and Parameters in Event Studio
publish-date=02062012