COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: raj_aries81 on 07 Nov 2014 01:10:04 AM

Title: How to flatten out the coulmns to Rows without using repeaters
Post by: raj_aries81 on 07 Nov 2014 01:10:04 AM
Hi All,

I have a list report as below

Col 1     Col 2     Col 3
-----    ------    -------
A           1           4
A           1           5
B           2           6
B           3           7

I would need something as below  -

Col 1     Col 2     Col 3
-----    ------    -------
A           1          4,5
B           2,3       6,7

I have used the repeater but its killing the performance....is there any way to achieve this

Regards
Raj

Title: Re: How to flatten out the coulmns to Rows without using repeaters
Post by: raj_aries81 on 07 Nov 2014 12:12:44 PM
Can someone guide me in sorting this out..
Title: Re: How to flatten out the coulmns to Rows without using repeaters
Post by: CognosAnalytics on 07 Nov 2014 01:33:20 PM
Hello raj_aries81,
What you have done with repeaters is the way to go for this sort of display where you want values from multiple records to be comma separated.
Other than that, you will have to involve your database guys to provide you with such comma separated transposed data. May be a function or a separate column with the transposition.

If your database is SQL Server, you "may" be able to use the PIVOT function in an SQL object in report studio making it a "Pass through SQL" and see if that helps. I have never tried this but worth a try.

-Cognos810
Title: Re: How to flatten out the coulmns to Rows without using repeaters
Post by: raj_aries81 on 10 Nov 2014 12:13:00 AM
Quote from: cognos810 on 07 Nov 2014 01:33:20 PM
Hello raj_aries81,
What you have done with repeaters is the way to go for this sort of display where you want values from multiple records to be comma separated.
Other than that, you will have to involve your database guys to provide you with such comma separated transposed data. May be a function or a separate column with the transposition.

If your database is SQL Server, you "may" be able to use the PIVOT function in an SQL object in report studio making it a "Pass through SQL" and see if that helps. I have never tried this but worth a try.

-Cognos810

Thanks Cognos810,

I am using Teradata as my DB. I need to check if I can get this done in DB. With repeaters am running into performance issues.

Regards
Raj