COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: jshamm on 10 Apr 2013 09:13:29 AM

Title: multiple conditional format
Post by: jshamm on 10 Apr 2013 09:13:29 AM
I have a variance column where the user wants the font color to be red if the variance is more than 5%.  If the variance is up to 5% then the font color needs to be yellow.  Is there any way in report studio to conditionally format text color this way?  Thanks for any input.
Title: Re: multiple conditional format
Post by: blom0344 on 10 Apr 2013 10:33:04 AM
We use a variable with a case to check the value, then use a style variable on the list column body to assign colors according to the outcome of the CASE in the variable.  The variable refers to a query item that translates to a set of values:
Case
when abs([perc]) < 5/100 then 0
when abs([perc]) >= 5/100 then 1
else 2
end



Title: Re: multiple conditional format
Post by: jshamm on 11 Apr 2013 08:09:48 AM
Thanks blom, I was able to use a string variable to get this to work however I've run into an issue.  I am attempting to highlight a variance intersection in my crosstab report.  currently, the report contains Actual, Budget, Variance, and Variance Percent.  I want the Variance column to be yellow if the variance percent is between 0 and 5% or red if the variance percent is over 5%.

As of now, the variance percent is the only intersection that will change font color even though I applied the conditional format to the Variance column.  Is it possible in version 8.2 to use conditional formatting on one column based on the value in a different column?
Title: Re: multiple conditional format
Post by: blom0344 on 11 Apr 2013 09:08:48 AM
We use this for more complex rowshading within list reports. Works fine..  Have no experience with this within crosstabs though..
Title: Re: multiple conditional format
Post by: Lynn on 11 Apr 2013 10:21:52 AM
Have you tried setting an advanced conditional style?