Skip to main content

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

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

All information submitted is secure.

  • Close [x]

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.

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

All information submitted is secure.

  • Close [x]

IBM Cognos Proven Practices: Using Active Report Variables in Cognos 10

Nature of Document: Troubleshooting; Product(s): IBM Cognos Active Reports; Area of Interest: Development

Cognos Proven Practices Team, Cognos Proven Practices Team, IBM
Cognos Proven Practices Team

Summary:  A demonstration of enabling the ability to view variables for Active Reports and monitor their behavior in a working report.

View more content in this series

Date:  11 Jan 2011
Level:  Introductory PDF:  A4 and Letter (293 KB | 13 pages)Get Adobe® Reader®
Also available in:   Chinese  Spanish

Activity:  15451 views
Comments:  

IBM Cognos Active Report Variables

What is the purpose?

It’s possible during the creation of an Active Report that the controls and objects in the report do not interact as the author intended. This document will highlight the ability to watch the active report variable values, and change those values to diagnose issues around report design. This document will step the user through creating a report (without the need for data) that will demonstrate how to view the active report variables and their values, as well as changing the values to see how those changes impact the active report objects.


Creating the Report

  1. Open report Studio against any Package. (Note the package isn’t important as no data items will be uses from the package to create the report. Only static items such as text items).
  2. When prompted select Create New, then select Blank Active Report.

    Screenshot of the Report Studio new report object type window

  3. From the Insertable Objects pane insert a Deck object into the blank report.

    Screenshot of the interable objects pane for active report object

  4. In the properties of the Deck, under General, click the ellipses beside the Deck Cards Definition entry to change the default settings.
  5. Change the default Label values for each card to Deck1, Deck2 and Deck3 respectively.

    Deck cards definition window

  6. Next insert into the body of Deck1 a text item, and type the text “Deck Number1”.

    Screenshot of a text object inserted into the card of a deck

  7. Repeat the process for Deck2 and Deck3 three, changing the text to correspond to the card that is currently active. To change the active card either select the card from the drop down list in the deck or select the blue double arrows to move to the next card in the deck.
  8. Insert a button bar into the blank report.

    Screenshot of report studio report with a deck and button bar

  9. In the properties of the button, in the General section select ellipses beside the Button Bar Definition entry.
  10. In the dialog box that opens select the New button to add a new column in the data table and when prompted enter “Value”. Then select OK.

    Screenshot of the Buttons Definiton window

  11. In the label column change each label to be Deck1, Deck2, Deck3 and then change the Value column to read Deck1, Dck2, Deck3. Then hit OK.

    Screenshot of Buttons Defintion with Value column and values added

  12. In the properties of the Button Bar select the ellipses in the Set Variable Values entry to open the Set Variable Values dialog box.

    Button Bar properties window

  13. Click the Hyperlink “Manage Active Report Variables…” to create a new variable. Click the new icon to create a new variable and name it v_buttonbar. Press OK.

    Screenshot of Active Report Variables definition

  14. In the Set Variable Value dialog box in the Value drop down box select Value. This is the column we created in step 11. Press OK.

    Screenshot of the Set Variable Values pane

  15. In the properties of the Deck, under Interactive Behavior click the three ellipses beside the Container Select entry.

    Screenshot of the Deck properties pane

  16. In the Condition Comparison dialog box select OK. The default entry is fine for this sample. It creates a filter between the label for each card in the deck and the variable v_buttonbar. Press OK, and then OK again to close the Container Select dialog box.

    Screenshot of the Condition Comparision for the Deck

  17. Save the report.

Viewing Active Report Variable Values

It is important to note, that you can only see and adjust the Active Report Variables when running the report from Report Studio. It is not possible to view the variables in the way detailed in this document, by running the report in Cognos Connection.

  1. In Report Studio run the report created in the previous steps. When the report has executed, in the viewer right click and select Show Variables.

    Screenshot of the run active report enabeling variables

  2. A new frame will appear showing all variables in the report, in this example only v_buttonbar is displayed. Currently the value is blank as the user hasn’t selected any buttons.

    Screenshot of Report Studio report output showing variable values

  3. As you click on the buttons notice that the value in the variable v_buttonbar changes.

    Screenshot of Variables watch window

  4. Notice that when you click on the button Deck2, nothing happens. The value in the text item remains the same as it was in the previous button selection. This is because the value for the label in card2 is Deck2, where the value Button2 submits is Dck2. These two values don’t match and as a result nothing happens when Button2 is pressed.
  5. To see how changing the value will impact the interaction between the Button Bar and the deck place your mouse cursor in the Value section of the Variables dialog. Notice the cursor changes from an arrow to the text crossbar.

    Screenshot showing how to alter the values in the variables pane

  6. Click inside the box to highlight the current value of the variable and change the value to Deck2. Then hit enter on the keyboard.

    Screenshot of the variables pane with the altered value

  7. The value in the report changes to show the text item in Card 2.

    Screenshot of the variables pane with the altered value


Conclusion

With the ability to track the values of variables in Active Reports the author can work to determine how the variables they create will interact with the other control object and report objects within their report.


About the author

Cognos Proven Practices Team

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


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. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

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.

(Must be between 3 – 31 characters.)

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

 


Rate this article

Comments

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business analytics, Information Management
ArticleID=607354
ArticleTitle=IBM Cognos Proven Practices: Using Active Report Variables in Cognos 10
publish-date=01112011