Saturday, August 16, 2014

How to design Cognos interactive reports 02 - Make columns flexible with ID and description

    1. Context

The solution from last blog (How to design Cognos interactive reports 01) is good to make columns flexible. However, sometimes we want query items to show not only description, but also ID, or combination of ID and description. It is very simple to get it done by simply making query item as needed as use value. This document will demonstrate the idea to use prompt token to make ID and description together. Please see attached report specification for review (version 10.2 with sample Package GoSales)
    1. Sample

The crosstab is generated based on Order method type. It shows as ID and description based on order method type.
    1. Prompt

Please note that order method type is specified as
cast([Sales (query)].[Order method].[Order method code], char(1)) + ' - ' + [Sales (query)].[Order method].[Order method type]
    1. Query

The key to make this simple report flexible is to apply prompt token
#prompt ('pColumn','token')#
    1. Layout



The column, or #prompt ('pColumn','token')#  is used  drive crosstab flexible, in this case it is
cast([Sales (query)].[Order method].[Order method code], char(1)) + ' - ' + [Sales (query)].[Order method].[Order method type]

Please note the formula can be more complicated as it is, it is pure based on requirement.

No comments:

Post a Comment