COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognosun on 01 Oct 2012 08:31:43 AM

Title: 3 colours - conditional styles
Post by: cognosun on 01 Oct 2012 08:31:43 AM
Hi,

We need to display..

values  '>0' in red.
values '<0' in green.
values '=0' in black.

I've achieved first 2 formats using conditional styles, is there anyway to achieve 3rd format using conditional style.

Many thanks,
Joys
Title: Re: 3 colours - conditional styles
Post by: pricter on 01 Oct 2012 09:00:11 AM
Instead of using conditional styles you could a style variable. Is this acceptable for you?
For example create a string variable with the following expression
case
when [Query1].[Unit cost]<0
then 'R'
when [Query1].[Unit cost]>0
then 'G'
else
'B'
end
and then and three values R, G, B

Declare the variable as a style variable and define your preffered colour for its variable value.
Title: Re: 3 colours - conditional styles
Post by: cognosun on 01 Oct 2012 10:14:52 AM
Yeah..I was looking using conditional styles :-)
Title: Re: 3 colours - conditional styles
Post by: blom0344 on 01 Oct 2012 02:07:07 PM
Pricter's solution is more versatile and works equally well..  Why not try it?