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.
- 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).
- When prompted select Create New, then select Blank Active Report.
- From the Insertable Objects pane insert a Deck object into the blank report.
- In the properties of the Deck, under General, click the ellipses beside the Deck Cards Definition entry to change the default settings.
- Change the default Label values for each card to Deck1, Deck2 and Deck3 respectively.
- Next insert into the body of Deck1 a text item, and type the text “Deck Number1”.
- 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.
- Insert a button bar into the blank report.
- In the properties of the button, in the General section select ellipses beside the Button Bar Definition entry.
- 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.
- 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.
- In the properties of the Button Bar select the ellipses in the Set Variable Values entry to open the Set Variable Values dialog box.
- 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.
- 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.
- In the properties of the Deck, under Interactive Behavior click the three ellipses beside the Container Select entry.
- 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.
- Save the report.
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.
- 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.
- 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.
- As you click on the buttons notice that the value in the variable v_buttonbar changes.
- 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.
- 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.
- Click inside the box to highlight the current value of the variable and change the value to Deck2. Then hit enter on the keyboard.
- The value in the report changes to show the text item in Card 2.
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.