Submitted by Dan Wagemann, Proven Practices Advisor
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 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 Category. Then within the bottom left Properties pane, change the General\Value Range from All data to Filtered data.
Figure 3 IBM Cognos Report Studio Visualization General Value Range Property on Quantity.
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.
Keep up-to-date with IBM Business Analytics Support :
Business Analytics Client Center | Business Analytics Supportlink | My Notifications | Twitter