COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Raghuvir on 03 Jul 2014 07:16:01 AM

Title: Dynamically display column headings in list header.
Post by: Raghuvir on 03 Jul 2014 07:16:01 AM
Hi all,

we have a requirement where we need to display values of a data item on the list header dynamically. for e.g. we have a data item for account name which has the follwing values.

Account id         Amount
A                          10
B                           5
C                           8
D                          20
E                          25
and so on.

what we need here is, we need to display account id on the coulmn heading in the list report dynamically and the values should be populated in the list row.

Output required
A       B      C      D     E
10     5       8      20   25

we require this in a list format. is  this possible ?

attaching the format in excel.
Title: Re: Dynamically display column headings in list header.
Post by: Bark on 03 Jul 2014 09:21:32 AM
Why don you use a crosstab? For what I see in the Excel attached, a crosstab would do just fine.

Regards,

Bark
Title: Re: Dynamically display column headings in list header.
Post by: BigChris on 03 Jul 2014 09:33:59 AM
If it really has to be a list, you're probably looking at creating a calculation for each column:

AccountID_A: total (if(Account id = 'A') then (Amount) else (0))
AccountID_B: total (if(Account id = 'B') then (Amount) else (0))

Tedious, and possibly quite an overhead for the report. Plus you've got the possibility of new accounts which wouldn't get picked up by default...try to convince them that a crosstab is the way to go.