Yes, this is possible. Just create the calculated column to populate based on the prompt value, and then group on the calculated column. If you are running on Oracle and have auto decode off, then using the Decode function explicitly here will give you better performance. Even so, you may not be able to force a group by clause to the database for a summary only report using such a dynamic grouping. It depends on the database and the location of the sources for the calculated column.
Hope this helps,
Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data" Want good answers? Read FAQ401-2487 first!
For a dynamic column header, create a calculated text column, as in
If (Upper(?GrpKey?) = 'C') then ('Country') else if (Upper(?GrpKey?) = 'E') then ('Employee') else ( 'Unclassified') ...
(Use Decode as desired in place of If..Then..Else).
Then suppress the normal column titles and replace with static text, or other calculated columns as required.
It always worked fine for me.
Another fun technique is to have the report layout contain different information in the same columns, based on the values in the grouping. Create all of your displayed columnar data as calculated columns (i.e. DispCol1, DispCol2, etc) and populate the column with other calculated data based on group values. This allows a single report to do the work of multiple reports. I have a billing support report that shows both labor and other direct cost. I use a calculated column for the two types (Labor/ODC) and show either dollars or hours in the same column on different pages, based on the Labor/ODC value. The other trick to this is you may need a custom Style to use with conditional formatting to avoid having dollar signs on hours. If so, the end user needs to have the style in their impromptu.ini for it to display properly.
Hope this helps!
Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data" Want good answers? Read FAQ401-2487 first!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.