COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: haripali on 30 Apr 2009 12:00:05 AM

Title: Report Studio output A,b,c,d 100
Post by: haripali on 30 Apr 2009 12:00:05 AM
Report Studio output A,b,c,d 100
I have Query items product & revenue like
A  20
B  30
C  10
D  40

In Report Studio outpout in the report should be
A,b,c,d 100

haripali@gmail.com


query item product have values a , b ,c ,d with revenue has value 20,30,10,40 for product a, b, c, d.
2) I have to show all product in one column(separated by comma) i.e. "a, b, c, d" & teir total revenue 100 in second column.
Title: Re: Report Studio output A,b,c,d 100
Post by: david.stachon on 30 Apr 2009 03:59:48 AM
It's not totally clear what you're trying to do....

but from what I can tell, you're attempting to pivot vertical data to go horizontal.

One way to do that is with a master "list" ...and inside the list a detail "repeater" (that goes horizontally).
Title: Re: Report Studio output A,b,c,d 100
Post by: haripali on 30 Apr 2009 10:11:54 AM
let me take a case from sample package "go sale go retialers" in cognos 8.1 Report Studio, data is like this

Product line                                   Revenue
--------------                         -------------------
Camping Equipment                      $89,713,990.92
Mountaineering Equipment             $20,891,350.60
Golf Equipment                           $25,905,465.58
Camping Equipment                     $89,713,990.92
Outdoor Protection                     $3,171,114.92

now report output should come like this

Product line                                    total Revenue
-------------------                       ----------------
Camping Equipment,Mountaineering   $171,576,387.88
Equipment,Golf Equipment,Camping
Equipment, Outdoor Protection                                         

guide me





   
Title: Re: Report Studio output A,b,c,d 100
Post by: david.stachon on 01 May 2009 03:22:23 AM
...a bizarre requirement.

the conventional way to display this would be detailed rows, and a summary line.

....however, it can be done.

I've attached a sample using the "GO Data Warehouse (query)" package.

good luck!
Title: Re: Report Studio output A,b,c,d 100
Post by: k2 on 11 May 2009 05:41:14 AM
Hello Dave, i can't able to open your sample report in version 8.3, could you let me know in which version you did that. Cheers
Title: Re: Report Studio output A,b,c,d 100
Post by: amitj on 12 May 2009 06:19:50 PM
Hello,

I have implemented this kind of scenario ..however not sure if this is a right method of implementation..!!

Following are the steps-

1.Select a Blank Report
2.Select Table from Tool Box with No of rows and column values as 2,2.
3.Select Text Item and place it in header of first column and give title as Product Line.
4. Repeat step 3 for second header as 'Total Revenue'
5. Now select repeater from tool box and place it in second row (i.e. below Product Line) and add product line data item to that column.
6. select repeater from toolbox and place it in second row (i.e. below Total Revenue)
7. If you run this report ,you will get expected result but without ',' between product line.
8. To insert ',' between product line select Text item from tool box and place it after product line column.

run this report and you will get expected results... :)

Only loop hole is comma will also appear after last product line name... :(
Title: Re: Report Studio output A,b,c,d 100
Post by: david.stachon on 12 May 2009 11:00:20 PM
...yeah, that last comma is a bummer.

unfortunately, you'll need to do a conditional thing with rowcount() (i.e. hide it on the last row)