If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Using conditional styles to hide rows in a crosstab

Started by mitch.c, 16 Dec 2011 03:47:24 PM

Previous topic - Next topic

mitch.c

Hello forum,

I wonder if I can impose on someone to help me with an issue I'm having.  I have a simple crosstab report that looks like this:

FIG. 1
(crosstab corner)            | count 1 | count 2
-----------------------------|---------|---------
node 1    | sub-node 1       |       10|        1
-----------------------------|---------|---------
          | sub-node 2       |       10|        0
-----------------------------|---------|---------
node 2    | sub-node 3       |        5|        5
-----------------------------|---------|---------
          | sub-node 4       |        1|        0
-----------------------------|---------|---------
          | sub-node 5       |        5|       10
-----------------------------|---------|---------
node 3    | sub-node 6       |        5|        0
-----------------------------|---------|---------
          | sub-node 7       |        1|        0
-----------------------------|---------|---------
node 4    | sub-node 8       |        2|        9
-----------------------------|---------|---------


I'm trying to suppress the rows where count 2 equals 0 by applying conditional styles to both the member fact cells (count 1 and count 2) as well as the sub-node cells.  I've been successful in hiding the member fact cells but I'm not able to hide the sub-node cells.  For illustration purposes, after applying the conditional styles, the report should look like this:

FIG. 2
(crosstab corner)            | count 1 | count 2
-----------------------------|---------|---------
node 1    | sub-node 1       |       10|        1
-----------------------------|---------|---------
node 2    | sub-node 3       |        5|        5
-----------------------------|---------|---------
          | sub-node 5       |        5|       10
-----------------------------|---------|---------
node 4    | sub-node 8       |        2|        9
-----------------------------|---------|---------


In Condition Explorer, I set up a boolean variable and used the expression [count 2] = 0 which when true, the rows will be hidden and when false (count > 0) the rows will show.  Using select ancestor, I selected Crosstab member cells and applied the condition to the Style Variable property.  I did the same thing for the Crosstab Node Member but it won't hide the node member cell.  Consequently the entire row is still visible and only the member fact cells are hidden.  Like this:

FIG. 3
(crosstab corner)            | count 1 | count 2
-----------------------------|---------|---------
node 1    | sub-node 1       |       10|        1
-----------------------------|-------------------
          | sub-node 2       |                   
-----------------------------|-------------------
node 2    | sub-node 3       |        5|        5
-----------------------------|-------------------
          | sub-node 4       |                   
-----------------------------|-------------------
          | sub-node 5       |        5|       10
-----------------------------|-------------------
node 3    | sub-node 6       |                   
-----------------------------|-------------------
          | sub-node 7       |                   
-----------------------------|-------------------
node 4    | sub-node 8       |        2|        9
-----------------------------|---------|---------



I've tried many combinations and nothing seems to be working.  I'm using Report Studio 8.4.  My real-world report is obviously much more complex but this illustrates exactly what I'm trying to accomplish.  Fig. 2 is the desired result.  Thank you in advance to anyone with suggestions.

blom0344

Perhaps, the following filter (as opposed to using cond. formatting)

total([count1] for [item(subnode1)]  <> (total([count1] for [item(subnode1)] + total([count2] for [item(subnode2)])

as an after-autoaggregation filter