Saturday, August 22, 2015

How to make column chart with break

Please see sample report below
You can download the report specification (Cognos 10.2.1) for review.
This is a difficult problem to resolve, as you want to break line, and to group columns in different groups with gap. The only solution is to use two separators behind the scene. To make data not show, we can make both values (revenue and gross profit) null. The real issue is to get rid of x-category and legend of two separators.

Add separator
Separator 1
Category:   cast( 'S1' as varchar(4))
Region:    ' '
Revenue:    null
Gross profit:   null
Group: 2

Suppress labels for separator
We can apply report expression to suppress x-category as below

Suppress legend for separator
Unfortunately Cognos doesn’t provide a way to get rid of legend. We can perform custom legends, but it could be very complicated as these legends are dynamically based on data. The idea here is to make the separator legends as white space, so that indirectly supress the separator legend.

No comments:

Post a Comment