Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help making Alternating Row colors for a Crosstab

Status
Not open for further replies.
May 6, 2009
8
US
So I have found some help searching the cognos support through IBM, but it isn't right for my situation.
I am trying to make a crosstab where each row alternates colors (color doesn't matter, just need it for visibility purposes). The reason why my situation is a little different is because, I have 2 columns instead of one that relate to each row.
AKA instead of their example with product line(row) and revenue(column). I have department(row) than Units(column) and Revenue(Column) which both relate to each department. Also, I am not sure what they mean in their example help when they say in the query, place the newly made alternate color data item at the (row object)department level (this is not done on the page but in the query, because that is another step following this one). Can anyone shed some light on this issue for me?
 
you can try the conditional variable and using row_count to do that

Anda
 
From your description you have a row (department), a column (unit) and an intersection (Revenue).
Is that correct?
The solution depends on whether you work with ReportNet, Cognos 8.1 / Cognos 8.2 etc.
We haven't gotten it to work with 8.1 as the RowNumber() is not supported in a boolean variable

Ties Blom

 
I am using Cognos 8.3, I found a solution for my problem but it only works with Reportnet (of course). And the Crosstab looks more like this, on the left there is only a single row, "Department", above there is 3 column headings, there is a high level column heading "Month" (which is made long enough to be placed ontop of both lower categories as one longer box), than month has 2 categories (also columns), "units" and "revenue" (picture two text boxes of equal length one on top of the other, the top textbox has "Month" written in it, while the bottom textbox is cut in half, one side with "units" the other side with "revenue"). So basically when I run the report the information I get can be understood as, Department A has 10 units and $100 revenue for the month of May 2009 (and I do this for several months at a time so these columns repeat a few times).
 
I think it should be possible when you can introduce a department table with an index that is distributed according to the order in which the crosstab data has to be displayed:

Code:
department  index
----------  -----
DEP1        1
DEP2        2
DEP3        3
DEP4        4

In the report it should be enough to have the expression :
mod([index],2) to get alternating values for the rows



Ties Blom

 
Just tested it, but it only works when you use the dataitem that is adressed in the boolean expression is added to the crosstab itself..

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top