COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: chiu2003 on 23 Dec 2019 04:15:49 AM

Title: Repeating Rows in Cross tab in dimensional report
Post by: chiu2003 on 23 Dec 2019 04:15:49 AM
Hi all,

I am new to cognos.

I need to repeating/ ungroup rows (all 4 dimensions) in crosstab report using below guideline (search in previous post)

(https://i.imgur.com/72gnHTA.png)


However, I cannot do that and i have no idea why all columns blank out and no row can be show.

I have upload my setting, hope can get some help. Thanks.

(https://i.imgur.com/ODiXpVe.png)
(https://i.imgur.com/qxS43zS.png)

Method using:

Your crosstab looks like this:


   Corner               | <#Columns#>
-----------+------------+------------
<#Node 1#> | <#Node 2#> |    <#1234#>


Drag two crosstab spaces directly before the Columns, and in the new intersections set Define Contents to Yes. By default these items won't have column titles, but for the purpose of this demonstration I'm calling them Space 1 and Space 2

(https://i.imgur.com/XDgqJ4G.png)

   Corner               | Space 1 | Space 2 | <#Columns#>
-----------+------------+---------+---------+------------
<#Node 1#> | <#Node 2#> |         |         |    <#1234#>


Unlock the report and drag a text item into intersections of Space 1 and Space 2. You don't need to type anything into them. Click on the text item in the intersection of Space 1 and change the Source Type to Data Item Value. Set the Data Item Value to Node 1. Do the same for the Intersection with Space 2.

(https://i.imgur.com/VPUDlH1.png)

Finally click on the Crosstab Corner and set Box Type to None. Click on the rows, select anscestor -> Crosstab Rows and set Box Type to None.

(https://i.imgur.com/ZytVBkR.png)
(https://i.imgur.com/lCkvkub.png)

If these instructions made any sense your crosstab should look like this now:

Space 1  | Space 2  | <#Columns#>
----------+----------+------------
<Node 1> | <Node 2> |    <#1234#>


And it should function exactly as you wanted.

It's also worth mentioning that you can use this method for getting around the problems with right-to-left (rtl) crosstabs in PDF. If you have a crosstab in Hebrew or in Arabic, and set the text direction in the cell behind it to rtl it will still appear as left-to-right in pdf. Just use this method but stick Space 1 to the right of Columns.
Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: Andrei I on 23 Dec 2019 10:00:17 AM
Can you just create and attach a simple image showing  what have and what you want? Just make something up in Excel
Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: chiu2003 on 23 Dec 2019 08:54:57 PM
Hi Andrei I,

Thanks.

Below is my original cross tab report and there is a grouping on row dimensions
(https://i.imgur.com/rzDyXGi.png)

Then, I use other method (create a data item that combine all 4 dimensions and add to first).
(https://i.imgur.com/Ygg9h1r.png)

It can achieve 90% of my requirement and repeating the row, but it also create one blank column (column A).
(https://i.imgur.com/NXe1AnJ.png)

Then, I try to set the box type to None to hide the new column, however, all columns shift to left
(https://i.imgur.com/sintpPL.png)
(https://i.imgur.com/Ucvelke.png)

Again, I am new to Cognos and the report is not created by me. Please let me know what can I do for further checking. Thanks.
Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: Andrei I on 24 Dec 2019 08:30:01 AM
Wow! I did not want you to do that many images :-)
I assume you are using a Dimensional package (DMR).
And you had tried CognosPaul's  workaround:
https://www.cognoise.com/index.php/topic,11363.msg37230.html#msg37230 (https://www.cognoise.com/index.php/topic,11363.msg37230.html#msg37230)

And it still didn't work?
Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: Andrei I on 24 Dec 2019 08:58:41 AM
Please check the attached example (using CognosPaul's solution)
It has an image and working report (C10, PP cube Great Outdoors)
Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: Andrei I on 24 Dec 2019 09:04:53 AM
Quote
Method using:
Your crosstab looks like this:
   Corner               | <#Columns#>
-----------+------------+------------
<#Node 1#> | <#Node 2#> |    <#1234#>

Drag two crosstab spaces directly before the Columns, and in the new intersections set Define Contents to Yes. By default these items won't have column titles, but for the purpose of this demonstration I'm calling them Space 1 and Space 2

I think you inserted Crosstab Spaces into ROWS rather than into COLUMNS

(https://i.imgur.com/ODiXpVe.png)
Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: chiu2003 on 26 Dec 2019 05:23:27 AM
Oh my god. I made a careless mistake
Thanks for your help

Can you recommend any textbook for learning Cognos Report Studio such as syntax?

I only have the official help menu.....

Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: Andrei I on 26 Dec 2019 07:03:01 AM
Just go through Cognos samples. That should have you started on the right path
Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: chiu2003 on 26 Dec 2019 09:54:49 PM
Thanks.

How can I get the sample?

Get a trial account?
Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: Andrei I on 27 Dec 2019 06:14:46 AM
You have to download Samples from the same IBM Passport Advantage site if you want to install it in your environment. Or just sign up for the CA cloud trial. They have samples configured
Title: Re: Repeating Rows in Cross tab in dimensional report
Post by: chiu2003 on 03 Jan 2020 10:18:20 PM
Thanks all. I just got one more request.

Please see below attachment and I need to convert it to Stock report (new)

https://drive.google.com/open?id=1-A3BxRA9uttNbL6VdUNU0G_6ifQ2C9sW (https://drive.google.com/open?id=1-A3BxRA9uttNbL6VdUNU0G_6ifQ2C9sW)

I can set the box type to "None" for all "Customer Sales Order" in Cognos to hide R2:U2 in excel report.

But when I try to do the same on Month of Calendar (YYYYMM), but it pop up an error.

If I cannot just simple hide it, so how can I create a data item that show the latest ending inventory qty for each physical location?

Thanks.