COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: SG1907 on 03 Mar 2015 12:35:52 AM

Title: Previous Record values
Post by: SG1907 on 03 Mar 2015 12:35:52 AM


***Current report output***

Column1 Column2 Column3
A             52         1000
A             53         2000
A             54         3000

B             82        4000
B             83        5000
B             84        6000

**Required output**
Column1 Column2     Column3
A            52,53,54     6000 (1000+2000+3000)
B            82,83,84     15000 (4000+5000+6000)

Please help....
Title: Re: Previous Record values
Post by: MFGF on 03 Mar 2015 04:38:43 AM
Quote from: SG1907 on 03 Mar 2015 12:35:52 AM

***Current report output***

Column1 Column2 Column3
A             52         1000
A             53         2000
A             54         3000

B             82        4000
B             83        5000
B             84        6000

**Required output**
Column1 Column2     Column3
A            52,53,54     6000 (1000+2000+3000)
B            82,83,84     15000 (4000+5000+6000)

Please help....

Hi,

A Repeater should give you the desired layout for Column 2

1. Create a list and drag in Column 1
2. From the toolbox, drag a Repeater as the second column in the list
3. Drag Column 2 into the Repeater
4. Drag a text item into the Repeater after Column 2 and enter a comma
5. Drag Column 3 into the list after the repeater
6. Go to the query of the Repeater and add Column 1 as a data item
7. Go back to the page and create a Master/Detail relationship between the Repeater and the List, based on Column 1
8. Change the column heading of the Repeater column in the List to say "Column 2"

The end result should look something like this:

(https://image.ibb.co/drZ73Q/Repeater_zps3w0sebla.png)

Cheers!

MF.