COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: dinos on 07 Dec 2009 03:56:49 PM

Title: Make table cell values appear side by side.
Post by: dinos on 07 Dec 2009 03:56:49 PM
Hi,

I have this query result:

1   a
2   a
2   b
2   c
3   a

I am looking for a way to display the above in this way:

1   a
2   a,b,c
3   a

I thought it was the repeater table or something, but couldn't figure it out.  Any ideas?
Title: Re: Make table cell values appear side by side.
Post by: vinu on 07 Dec 2009 11:37:06 PM
Hi diz420,

first group on column "A" to avoid the duplicates then drag repeater in to your list column and unlock the column  drag the column 'B' in to repeater to get the data side by side.

Regards,
Venu
Title: Re: Make table cell values appear side by side.
Post by: dinos on 08 Dec 2009 07:57:13 AM
Hi,

Great suggestion.  If I wanted to delimit the values of column B with a comma or slash, how would you go about doing that?
Title: Re: Make table cell values appear side by side.
Post by: CognosPaul on 08 Dec 2009 02:59:32 PM
I'd recommend using a crosstab. Put the letters in the rows with your text item delimiter after it, set the boxtype of the corner to none. Create a Boolean variable called "RenderComma" in the expression editor put in something like isLastColumn() = 0 and set it as the render variable on the text item.
Title: Re: Make table cell values appear side by side.
Post by: vinu on 08 Dec 2009 11:10:26 PM

Hi diz420,

using pading we can differentiate by showing some space between the values .

To delimit the values with comma or slash need to think about it  :).

Regards,
Venu

Title: Re: Make table cell values appear side by side.
Post by: vinu on 09 Dec 2009 02:59:19 AM
HI,

If you want show any comma or slash after the value,unlock the Column B and insert a text item with required symbol.

Regards,
Venu