Sunday, March 25, 2012

change font color in subtotal

My matrix looks like this:
row1
row2
subtotal
The subtotal background color is different than the regular row and this
part is working, I also want to change the font color of the subtotal based
on the subtotal value.
=IIF(
Parameters!RP_PERCENNUM.Value=1,(IIF(SUM(Fields!Percentage.Value)>100,"Red","Transparent")),(IIF(SUM( Fields!Hours.Value)>40,"Red","Transparent")))
The above statement won't work and it changes everything to red. I have
tried to use InScope and it did the same thing.
=IIF(
Parameters!RP_PERCENNUM.Value=1,(IIF(InScope(SUM(Fields!Percentage.Value))>"100","Red","Transparent")),(IIF(InScope(SUM(
Fields!Hours.Value))>"40","Red","Transparent")))
Anyone has any idea how to change the color? Thanks.You would need to nest your IIF's inside of another IIF
or
write code in the Report Code field, with input parameters, for Percentage
and Hours, and a return parameter of your font color. Then call this code
from the font color property as an expression
"Helen" wrote:
> My matrix looks like this:
> row1
> row2
> subtotal
> The subtotal background color is different than the regular row and this
> part is working, I also want to change the font color of the subtotal based
> on the subtotal value.
> =IIF(
> Parameters!RP_PERCENNUM.Value=1,(IIF(SUM(Fields!Percentage.Value)>100,"Red","Transparent")),(IIF(SUM( Fields!Hours.Value)>40,"Red","Transparent")))
> The above statement won't work and it changes everything to red. I have
> tried to use InScope and it did the same thing.
> =IIF(
> Parameters!RP_PERCENNUM.Value=1,(IIF(InScope(SUM(Fields!Percentage.Value))>"100","Red","Transparent")),(IIF(InScope(SUM(
> Fields!Hours.Value))>"40","Red","Transparent")))
> Anyone has any idea how to change the color? Thanks.
>

No comments:

Post a Comment