COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: ry1633 on 18 Jul 2017 10:53:12 AM

Title: Grouping question
Post by: ry1633 on 18 Jul 2017 10:53:12 AM
I have two fields in my database layer as follows:

[table1].[RefID] 
[table2].[Product Code]

What I'd like to do is create a single field that shows a grouped listing of every Product Code for a single Ref ID, separated by commas like Code1, Code2, Code3

Can I do this in Framework Manager or is this something I should have my dba create for me at the db level?
Title: Re: Grouping question
Post by: bdbits on 27 Jul 2017 01:03:52 PM
You could get it into FM, but the data item would get recreated/rerun every time you use it. So I would persist it into the database, i.e. have the dba create you a table.
Title: Re: Grouping question
Post by: ry1633 on 28 Jul 2017 01:45:34 PM
yeah it ended up being best for my dba to do it.  I could kinda get close with some joins,  but my dba was able to build it with the oracle listagg function into a table for me.  Much nicer solution :)
Title: Re: Grouping question
Post by: dougp on 28 Jul 2017 02:54:10 PM
For those who have no control over the database...

This can be solved in Cognos Report Studio or Cognos Anaytics Reporting.  See the attached report spec.