IBM Support

IBM Cognos Active Report Visualization Client-Side Sorting of Filtered Output

Question & Answer


Question

How do I sort the Y Category based on a Measure for my IBM Cognos Active Report Client-Side rendered Visualization?

Answer


Although IBM Cognos Active Report controls can filter the visualization during client-side rendering, the sorting of data items based on a measure within the visualization can only be done server-side. The following steps outline a technique which applies the sort on the data object, based on a measure value prior to the client-side rendering. This approach ensures the visualization maintains the desired sort order during the client-side rendering process.

This technique starts off with an IBM Cognos Active report consisting of a Data Radio Button Group populated with the Order method type and a client-side bar chart visualization populated with Quantity as the Size(Measure), Year as the Series and Product line as the Y category sorted descending by Quantity in the layout. The Order method type is defined as an extra Y Category, as the Product line is the data item being sorted.


Figure 1 Server Side IBM Cognos Active report with a Bar Chart Visualization.

If this particular report is executed, the Product line is not sorted by Quantity as defined in the layout sorting.

Figure 2 IBM Cognos Active Report Output with No Sort Applied to Product line.

To ensure that the sorting is applied to the client-side rendered visualization, select the Y Categories. Then within the bottom left Properties pane, change the Category Range from All data to Filtered data.


Figure 3 IBM Cognos Report Studio Visualization General Value Range Property on Product line.

In addition to setting the Category Range property, a nesting needs to be defined on the Y Categories of the Stacked Bar Data container. With the Stacked Bar Data area selected, change the bottom left General\Nesting Order property to list the Order method type query item above the Product line. This will ensure that the Product lines are sorted within the context of the Order method selected in the radio control.


Figure 4 IBM Cognos Report Studio Visualization General Nesting Order Property.

If the report is re-executed, the output displays with the desired descending sort.


Figure 5 Cognos Active Report Output with a Descending Sort Applied to Product line based on Quantity.

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Report Studio","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.2.1","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21672857