COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: madhancog on 05 Aug 2011 01:24:22 AM

Title: need values in single row
Post by: madhancog on 05 Aug 2011 01:24:22 AM
Hi gurus,
  I need a report that should show the values in single row.
  i am attaching the current output and expected output along with it.

Thanks in advance
K.M
Title: Re: need values in single row
Post by: Arsenal on 08 Aug 2011 04:06:39 PM
doubt you can get what you need without creating a huge concatenated list of every product that your client has and that too it better have a separate column for each product or have a cube

when you group a list, then every column is grouped and rolled up under the appropriate value till a "break" occurs. That is, till it comes across values which are different but have the same preceeding columns, In your case, it is the Products column. At this point, products will be listed in separate rows. At best, you can control the way the preceeding columns have row reptitions (so for example, you can get Apr 2011 to repeat for each row of the products column).

Would be interested to know if someone else knows of a way somehow
Title: Re: need values in single row
Post by: madhancog on 09 Aug 2011 01:13:00 AM
Hi,
  I have done this with the help of repeater,but still my problem is i am having comma at the end of the last product.

Thanks
K.M
Title: Re: need values in single row
Post by: Lynn on 09 Aug 2011 06:51:16 AM
You can suppress the last column if you add a total count and a running count data item to your query. Include them in the properties of the repeater. Then create an advanced conditional style on the comma text item.

You'd have one expression for "all other values" that would be the default style (no need to edit the style). Then add an expression e.g.,


[ReportQuery].[MyTotalCount] = [ReportQuery].[MyRunningCount]


Then edit the style for that expression to be box type none.

If you looked at the tabular data that has Product, MyRunningCount and MyTotalCount you'd see:

A   1   3
B   2   3
C   3   3


The comma would appear after A and B because running count is not equal to total count. It would be supressed after C because the two figures are equal.

Title: Re: need values in single row
Post by: CognosPaul on 09 Aug 2011 12:07:32 PM
Instead of doing it like that, put the ' ,' in front of the item and put a render variable where RowNumber<>1.

Total counts are expensive.
Title: Re: need values in single row
Post by: Lynn on 09 Aug 2011 12:12:23 PM
 8) 8) 8) 8)

Paul is awesome! Much better!!