COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: brandi on 23 Oct 2011 04:58:53 PM

Title: Cognos: Vertical to Horizontal Data in report
Post by: brandi on 23 Oct 2011 04:58:53 PM
Hi Folks
:)
I have figured out part of this solution but I need help to complete it.  I have data that shows:

Job               Name
Teacher         Mary
Teacher         Bob
Student         Joe
Student         Sara

I want it to show:
Teacher Mary, Bob
Student Joe, Sara


I can use a repeater table, but it repeates the job name. I only want that to appear once. So it shows up as:

Teacher mary      Teacher Bob
Student Joe         Student Sara

Can someone confirm how I can get it to show up in the BOLD sample area above in red??
Title: Re: Cognos: Vertical to Horizontal Data in report
Post by: Ras_MA on 23 Oct 2011 08:20:26 PM
So, you're trying to transpose the data.   

Instead of the repeater, try this:

Caveats:
Title: Re: Cognos: Vertical to Horizontal Data in report
Post by: brandi on 24 Oct 2011 12:10:19 PM
Thank you for the reply.

The sad part is that we don't know what data will be coming through. So filtering out the queries isn't an option. You are right, doing it on the DB is a solution. I just wanted to see if putting it in  RS would work.

I did find a solution though. I use Repeater tables... This will actually get the row of data to show exactly as it does on the DB rows. Which is what they are looking for. The sad part is that they want to export this to Excel. When I do, it takes each "repeater item" and puts it in it's own individual column. For each repeater cell, they want to all be in one column. So that may push this work to be done on the DB side.