COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sleepy on 07 Mar 2007 07:19:58 AM

Title: Display results on single line
Post by: sleepy on 07 Mar 2007 07:19:58 AM
Hi,

I current have a set or results that gives me

row#1  orange
row#2  apple
row#3  banana

I need to be able to display the results as:

FRUIT_BASKET: orange,apple, banana

ie all 3 fields on a single line with commas inbetween.

Does anyone know how I do this?

Cheers,
steve  ;D

PS: Im currently using Cognos 8, Oracle 10g
Title: Re: Display results on single line
Post by: MFGF on 07 Mar 2007 07:35:11 AM
Hi,

User a repeater (from the toolbox).

Best regards,

MF.
Title: Re: Display results on single line
Post by: BRAINMan on 13 Mar 2007 08:32:46 AM
Hi Sleepy,

another option would be to pivot your data. If you have your fruits in only one column, write a little view in FrameworkManager to get each fruit in one column. In ReportStudio you will now get three columns. Hide the list itself and just show the list headings with values in it. Add a text element in front of the three column list header and type "FRUITS:" in it. You could also put all three columns in one column and then separate it with text elements with an comma in it.

Hope this helps.

If you are facing problems in pivoting SQL, just let me know, ok?!

Regards, BRAINMan
Title: Re: Display results on single line
Post by: almeids on 11 Apr 2007 02:49:30 PM
BRAINMan,
   Just curious: are you referring to a method of "pivoting" dynamically in SQL, without advance knowledge of a column's content?  If so, I'd love to hear about it.
thanks,
Steve