COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: BISavvy on 15 Jun 2020 06:21:40 PM

Title: Can we use repeater and output in CSV?
Post by: BISavvy on 15 Jun 2020 06:21:40 PM
I am working on a report where vendor wants the report in CSV format. My requirement is to combine rows of data to a single column with comma separated values. I kind of achieved that using repeater, but when I run the report in CSV I am not getting the expected results.


Current Result with repeater and group by employee number
**************************************************
Employee Number,Last Name,First Name,Test Group
13000,gaga,lady,"Manager,"
1XXX0,swift,taylor," HR ADMIN,"
166XX,stefani,gwen,"Manager,"
166XX,stefani,gwen,"HR ADMIN, "
20500,gomez,selena, "Manager,"
20500,gomez,selena," HR ADMIN,"
2xx00,lopez,jennifer,"Peer,"
2XXX3,clarkson,kelly,"Peer,"
2XXX8,knowles,Beyonce," HR ADMIN,"
24XX,Bedengfeild,Natasha,"Peer,"
24XXX,kardashian,Kim,"Peer,"
2XXX0,Patten,Samantha,"Peer,"
2XXX2,Dion,Celion," HR ADMIN,"
2XXXX,Jenner,Kyle,"Peer,"

Expected Results:

Employee 20500 and 16XXX should be combined in to one
Employee Number .......Test Groups
20500..............  Manager, HRADMIN
16XXX................  Manager, HRADMIN
Title: Re: Can we use repeater and output in CSV?
Post by: dougp on 16 Jun 2020 11:32:54 AM
No.  Output to CSV causes the output of the first query that Cognos chooses to be output.  It has nothing to do with what is shown on your report page.
Title: Re: Can we use repeater and output in CSV?
Post by: aetcognos on 26 Jun 2020 04:54:07 PM
Is this oracle datasource, possibly you could use oracle function listagg to get the data on a single row.