COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: dragonfire on 14 Aug 2006 06:27:35 AM

Title: How to show data item horizontally using Repeater
Post by: dragonfire on 14 Aug 2006 06:27:35 AM
I would like to show data item in myreport with seperator in between:

E.g.
Fruit
Apple, Orange, Lemon

I tried to use Repeater and embedded with a comma. But I can't think of way to remove the last comma. I can only show the report like that.

E.g.
Fruit
Apple, Orange, Lemon,

Any hints on how to remove the last seperator?
Title: Re: How to show data item horizontally using Repeater
Post by: ClintSAP on 12 Aug 2022 10:31:18 AM
Set items to repeat to have the comma at the beginning rather than the end and unless it is the first record. You can put a rank data item in the query and use that to check whether it is the first record or not.
Title: Re: How to show data item horizontally using Repeater
Post by: dougp on 15 Aug 2022 10:50:42 AM
I make the comma its own data item:

case when running-count (distinct [Fruit]) < count (distinct [Fruit] for report) then ', ' end