You are on page 1of 12

Viewing Variables in Active Reports

Nature of Document: Troubleshooting


Product(s): IBM Cognos Active Reports
Area of Interest: Development

Business Analytics
Viewing Variables in Active Reports 2

Copyright and Trademarks


Licensed Materials - Property of IBM.

© Copyright IBM Corp. 2010

IBM, the IBM logo, and Cognos are trademarks or registered trademarks of International
Business Machines Corp., registered in many jurisdictions worldwide. Other product and
service names might be trademarks of IBM or other companies. A current list of IBM
trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml

While every attempt has been made to ensure that the information in this document is
accurate and complete, some typographical errors or technical inaccuracies may exist. IBM
does not accept responsibility for any kind of loss resulting from the use of information
contained in this document. The information contained in this document is subject to change
without notice.
This document is maintained by the Best Practices, Product and Technology team. You can
send comments, suggestions, and additions to cscogpp@ca.ibm.com.

Business Analytics
Viewing Variables in Active Reports 3

Table of Contents
1 IBM COGNOS Acitve Report Variables............................................................................4
1.1 What is the purpose?......................................................................................................4
2 Creating the Report......................................................................................................4
3 Viewing Active Report Variable Values...........................................................................9
4 Conclusion.................................................................................................................12

Business Analytics
Viewing Variables in Active Reports 4

1 IBM COGNOS Active Report Variables.


1.1 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

2 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.

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

Business Analytics
Viewing Variables in Active Reports 5

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.

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

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.

Business Analytics
Viewing Variables in Active Reports 6

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.

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.

Business Analytics
Viewing Variables in Active Reports 7

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.

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.

Business Analytics
Viewing Variables in Active Reports 8

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.

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

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.

17. Save the report.

Business Analytics
Viewing Variables in Active Reports 9

3 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.

Business Analytics
Viewing Variables in Active Reports 10

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.

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

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.

Business Analytics
Viewing Variables in Active Reports 11

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.

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.

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

Business Analytics
Viewing Variables in Active Reports 12

4 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.

Business Analytics