Part 1 of Building Effective IBM Cognos Active Reports, described Active Report Variables, Connections, and how they work together to make dynamic content possible in IBM Cognos 10 Active Reports. When the user interacts with a report item, one or more Active Report variable values can be changed. These changes can trigger effects in the report (selecting data, filtering controls, etc.). This article discusses how to use static controls to make larger scale changes to what the report displays.

Static Decks and Tab Controls

Data controls create a card/tab for each different value in a query item (for example, one tab for each Product Line value). The static versions of these controls work in a similar manner, but instead of creating different cards/tabs per data item value, the report author manually defines each card/tab for the control. This makes them much more useful for displaying different types of information in an Active Report (such as summary and detail screens).

Most Active Reports need to be able to be viewed offline. When viewed offline, an Active Report is self-contained. There is no way (while offline) to link or drill to a separate report, so a single Active Report must contain every screen the user will see: summary, detail, and everything in between. When using these static controls, you are able to create these multiple screens.

When designing this type of report, the top control on the report can be a static deck or tab control. These objects contain a card for each screen that will be displayed. For example, an Active Report might contain the following cards:

– Introduction (explain the report)

– Summary (high level charts and graphs)

– Detail (“drill through” list data)

Card Control Variable

Moving between these cards is not done directly by manipulating the deck control, but instead via an Active Report variable. “Card control variable” is not an official IBM Cognos term, but is still a useful way for thinking about this very important variable. The use of this variable follows the basic principle of how Active Reports work: whenever a variable changes, Cognos automatically updates all of the objects affected by that variable.

The card control variable is a string variable that controls which card in the static deck is being shown. The deck is configured to select a card based on the value of the variable. Whenever any report action should change the display (for example, clicking on a graph to get a “drill through” detail view), it just needs to set the card control variable to the appropriate value.

When creating a top-level control and card control variable, a best practice is to create two fields for each tab/card: one for the display name, and one to be used by the variable. Otherwise, changing the display name of a card/tab can require recoding every control that sets the card control variable.

Simulate Drill Through

The most common use of the card control variable is to simulate drill through in an Active Report. For example, consider a summary bar chart and a detail list control. If both controls are on the same screen, the drill through is simple: create an Active Report variable that filters the list based on a data field value used in the chart, and configure the chart to set that variable when the user clicks on one of the bars.

 

If the two controls are on different screens (for example, different cards in a static deck), the only difference is that the chart drill action needs to also set the card control variable to display the detail screen instead of the summary screen.

 

 

As shown in the first screenshot above, manually setting the card control variable to the value for the detail card will cause the Active Report to display the drill details. From the user’s perspective, they are “drilling” from one report to another.

In Part 3 of this series, we’ll discuss some fine points of this type of Active Report, including how to get back from the detail page, animations, and more.