COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: rcaesar on 02 Jul 2010 08:44:35 AM

Title: Conditional Formatting -Color Challenged
Post by: rcaesar on 02 Jul 2010 08:44:35 AM
Hi Gurus,

I am trying a conditional Formatting (CF) with 3 conditions. As I cannot use Boolean, the only other choice I have is using String.

But, I am having a hard time defining the colors. For example, I used this with a string var):
_________________
If ([401 Contract Fin. Data Main Qry].[Percent Liquidated]>.2 and [401 Contract Fin. Data Main Qry].[Percent Liquidated] <.5) Then 'Red'
Else if ([401 Contract Fin. Data Main Qry].[Percent Liquidated] >.5 ) then 'Blue'
else 'Other'

(the other is basically the default color in the column)
_____________

What I get is Red and no Blue. Actually, I wanted Red and Teal, but Teal doesn't seem to show up. (btw the column is formatted to % )

Are there any color codes? Or is my approach wrong?
If I don't use a conditional statement (say with a Boolean, Yes, No) - then I can choose from a wide selection of colors.
So, is there a way I can avoid using a conditional statement for 3 options so that I can choose from a wide selection of colors?

Any help or direction is much appreciated.

Thanks
Title: Re: Conditional Formatting -Color Challenged
Post by: rcaesar on 02 Jul 2010 04:17:55 PM
I worked on this a bit more and found a good solution.

Thanks for reading, though.
Title: Re: Conditional Formatting -Color Challenged
Post by: MFGF on 06 Jul 2010 07:36:54 AM
Hi,

You should be able to pick any colour you like for each returned value.  How have you applied colours based on the variable?

MF.