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 17 days ago

  

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 visualisation! 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 copy the original visualisation. 

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
#championsblogfeed
1 comment
29 views

Permalink

Comments

16 days ago

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