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

Negative numbers

Started by Garima, 21 Jun 2007 04:40:10 AM

Previous topic - Next topic

Garima

Hi..
In my list report there are around 50 columns which contain numeric data.I was looking for a way to highlight negative numbers red!!Though conditional variables can be used...but is there some generic method that I can use for all the columns instead of using 50 conditional variables!!!
Is there a way to achieve this in cognos 8??
Thanks,
Garima

Desperado

There is one ......
Create 1 conditional variable. (say Var_Xyz)
copy the report.xml to some editingtool (Edit Plus).
search for this conditional variable (Var_Xyz)
now, copy it and paste it in a new sheet . (As u need 50 variables, just have 50 (Var_Xyz) on the same sheet)
now, you can rename the remaining 49 with the new variable names and the column names. once after this is done copy the entire sheet, and paste it in the same place in report.xml.

this will work.

Garima

Thank you so much... :) I think its a very nice method and will save us a lot of time.
But I was wondering if there is some kind of workaround so that just one variable can be used for the entire list body i.e on all the columns...or some sort of data formatting that we can apply so that negative numbers get highlighted.

goose

only the negetive sign symbol via data formatting.

Garima

The negative sign symbol is not the concern I need to change the colour if the values are negative........
I can do this using conditional variables but am looking for some way so that I donot have to use so many conditional variable....(as the number of columns are around 50)!!!

For eg.If we select few columns and apply the percent data format to it and also specify that the symbol should be % then all the values in the selected columns get the symbol % ...similarly am trying to find a way out such that the colour of the negative numbers could be changed to something that we specify eg.red.

goose

Sorry Garima what I meant was there is nothing you can do that I know of in Cognos like want you want. Your best bet would to use negetive symbol sign but thats obviosuly not what you want..... I am interested how you fit 50 columns on one page or are you using A3 paper?

larsonr

We asked Cognos about that during the first release of Cognos 8.  Coming from a PowerPlay background this should have been a no brainer to include.  When we asked Cognos, they said they would log it for an enhancement.  3 releases later, still no sign of it coming any time soon.

roadwarrior

Or, create a single boolean variable like the following:
(C1<0 or C2<0 or C3<0 or C4<0 or ... or C50<0)
Assign the same style variable to all columns.
Apply style (red font) for the correct Yes/No value of the variable.
This approach will only execute a single variable rather than 50 variables.
Not sure if it will be any more or less efficient to execute at report run time, but it should be far easier to implement at report design time than creating/maintaining 50 variables.