Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only

What report authors need to know about the Interactive Viewer.

By Marc Reed posted Tue April 08, 2025 04:31 AM

  

The interactive viewer gives report consumers the ability to add further operations on a report after it has run. For example. additional filters or sort orders can be added. The available operations depend upon the type of data container. The operations differ for:

  • List
  • Crosstab
  • 11.1 Visualisations
  • Charts

The interactive viewer is a powerful feature, but we must consider how it works when we build a report.

When a report contains a singe data container the expected behaviour of the interactive viewer is obvious. Here the consumer would expect the operations to affect the List.

But what should happen if the report contains multiple data containers? For example:

What should happen in this report if the report consumer applies an interactive filter on the List. Should it only filter the List, or should it filter both the List and the Crosstab?

It may well be that the behaviour we want depends on the report. In some reports we may want the filter on both the List and Crosstab, in others we may just want the filter applied to one object.

As a report author it is important that you understand where the interactive operations take place and the limitations of the interactive viewer. This will help you build a better interactive report.

How do we get the behaviour we want? How do we build a report that will filter both the List and Crosstab?

Before I continue, I will just add a reminder on the difference between a 11.1 Visualisation and a Chart. 

11.1 Visualisations are rendered on the client. As such they provide interactivity without re-running a query. Charts are legacy Charts from earlier versions of Cognos Analytics. They are rendered server side.

Filtering and Navigating


When building a report some operations are applied to the Query whilst others are applied to the data container, for example, filters are applied to a query whilst sorting is applied to the data container.

This is the same when these operations are applied using the interactive viewer.

When a filter is applied by the interactive viewer to a List, Crosstab or Chart (not Visualisation) a filter is added to the underlying query. We can use this to get the behaviour we want.

  1. If we want an interactive filter to apply to multiple data containers then build the data containers on the same query.
  2. If we want the filter to only apply to one object, then ensure it has its own query.

By default, when a data container is added to the report it will also add its own query.

Looking at the properties of my List I can see that it is based on Query 1:

If I add a new Crosstab to my report the first dialogue box I see is:

This is going to create a new Query for the Crosstab. I can change the query to Query 1:

This will build the Crosstab on the same query as the List.

This will ensure that filters applied by the interactive viewer will be applied to both the List and Crosstab. The same is true if I add more Visualisations and Charts based on Query 1. That is interactive filters applied to List, Crosstab and Chart will be applied to all Lists, Crosstabs, Charts and Visualisations (yes, I did deliberately exclude Visualisations from the first part of this sentence, more on this later).

The Navigate (drill up/down) is a bit of an anomaly. The navigate option is only available on Lists and Crosstabs.

Whilst navigating is only available on Lists and Crosstabs, applying a navigate drill will apply to all Lists, Crosstabs and Charts that are based on the same Query. Visualisations will be filtered by the navigated data item.

For example, in the above report if I navigate on Camping Equipment to Product Type the report looks like:

The List, Crosstab and Chart have all drilled down. The Visualisation is simply filtered on Camping Equipment.

As a report author this may be a deciding factor to use a Visualisation or Chart within your report.

Remaining Interactive Operations

The remaining interactive operations, such as sorting, are applied on the data container. As such it is not possible to apply a sort to multiple data containers in a single operation.

Visualisations and Filters

Visualisations have their own filtering behaviour.

Visualisations have their own unique filtering behaviour.

A filter applied to a visualisation does not apply a filter to its underlying query. This is different to List, Crosstab or Chart. This gives the visualisation the advantage that the filter can be applied without rerunning a query.

Let’s consider a report based purely on visualisations and look at how this behaviour affects the interactive viewer.

This simple report consists of two visualisations. Both are based on the same Query (Query3).

If I examine the bar visualisation I can see that it is based on Query 3 an additional data item of Method Type.

Likewise for the line visualisation.

If I use the report in the interactive viewer and apply some filters to the column visualisation:

Notice how only the column visualisations has changed (compare to the earlier screenshot of this report).   Even though both visuals are based on the same query, filtering only applies to the one visualisation.

However, there is a way to change this functionality. It is possible to link visualisations! The trick is in how you create the second visualisation.

On this report I have a single column visualisation.

Instead of creating a new visualisation for the line chart I will duplicate the original visualisation. 

To duplicate the chart click on the original chart, holding down the CTRL key and drag and drop the chart. This should produce a duplicate of the chart. This is a standard control method to duplicate something. This technique only works if the chart is duplicated using the CTRL+Drag/Drop technique. Using other copy/paste methods will not work!

I will now convert this visualisation to a line visualisation:

Which will give: 

I can now replace the x axis Product Line with year.

Product Line has automatically moved into an extra data item.

The original column visualisation has also changed slightly.

Year has become an extra data item. This has moved Order Method into the Colour option. I need to move this back into the Extra Data.

If I now use this report in the interactive viewer I get linked behaviour. To demonstrate this here is the report when it is first run:

And if I now use the interactive viewer filter to apply an order method filter to the column visualisation:

Both visualisations have updated. Likewise, if I apply a Product Line filter.

(It is possible in visualisation to hide members after a filter. I have left them on to emphasise the behaviour).

Conclusion

The interactive viewer is a great feature to add functionality for a report consumer.

If we have multiple data containers to a report, then as a report author we must consider the behaviour we want from the interactive viewer and design our report and queries around that behaviour.

The visualisation shared data set behaviour can be induced by copying visualisation rather than creating new visualisations. I don’t think this functionality is available in other way in the report editor.

There are certainly some areas where a bit of future enhancement would turn a great feature into a perfect feature.

And whilst I am here, if anyone in Cognos product development is reading. If this visualisation data set behaviour is likely to be exposed better in future versions, is calling this a data set, and then having other bits of Cognos functionality called Data Sets likely to cause confusion?

If I asked you what a report data set was – what answer would you give? The visualisation data set or the cognos analytics data set.


#IBMChampion
#champions-blog-feed

6 comments
51 views

Permalink

Comments

I've tested the feature of interactive filters on visualizations (copy-paste vs ctrl+drag), and found that the behavior is consistent across 11.17 to 11.2.X to 12.0.X and now on the latest 12.1.0. I tested in firefox browser. I am not sure if the behavior changes by browser types though.

The difference between a copy-paste and a duplicate (ctrl+drag), is that a duplicated viz would share the same temp datastore (referred to as 'refDataStore' property in the report specification). A copy-pasted viz will use a different temp datastore. Hence, while a duplicated viz reacts to the filters on original viz, a copy-pasted one do not and vice-versa.

I created a simple report using 'gosales (query)' samples package and created a clustered bar viz. And then duplicated it and modified it to be Line chart.

I also copy-pasted the bar chart and changed it to a smooth line chart.I noticed that in the report specification, while the Bar and Line charts have same value for refDataStore, smooth line viz is using a different value. If we modify and set the reDataStore for all three to share same value, you'd notice that they all react to the filters applied.

@Marc Reed

18 days ago

@John Dahlmans

Could you try something for me?

This might sound bizarre. In my steps to get linked visualisation working I say "copy and paste the original visualisation and then convert it".

Instead of doing a copy/paste using menus or keyboard shortcuts, could you try doing a ctrl + drag and drop to duplicate the visualisation.

24 days ago

@Marc Reed

I agree ! Would be a great feature. Thanks anyway. Keep up the great work of posting these blogs. Very appreciated.

24 days ago

@John Dahlmans

I just tested this in 12.1 cloud trial and it looks like linked visuals is now broken. What a shame!

I know that IBM is adding more visual capability to reporting and in 12.1 they added Data Brushing to visuals.It would be a shame if this feature came at the cost of linked visuals (which in my opinion is far more useful than data brushing).

24 days ago

Great post. However I cannot get the linking of the visualizations to work. Is there a restriction on install/release/browser ? I tried it on 11.2.4 and 12.1.0 versions in a Chrome/Edge browser.

Wed April 09, 2025 08:24 AM

Thank you very much for this great overview! Without it I would never had a chance to get something similar.