I have tried nearly everything I can think of to get this to work, to no avail. I have a text box that I want the font color to be light gray if a certain value is true and black if it is false. Here are all the expressions that I've tried:
=IIF(Fields!is_hold.Value,"LightGrey","Black")
=IIF(Fields!is_hold.Value,"#d2d2d2","#000000")
=If(Fields!is_hold.Value,"LightGrey","Black")
=If(Fields!is_hold.Value,"#d2d2d2","#000000")
=IIF(True,"#d2d2d2","#000000")
=IIF(True,"LightGrey","Black")
=If(True,"LightGrey","Black")
=If(True,"#d2d2d2","#000000")
=SWITCH(True,"#d2d2d2",False,"#000000")
=SWITCH(True,"LightGrey",False,"Black")
The strange part is that it works fine on another subreport when I pass [is_hold] as a parameter:
=If(Parameters!IsHold.Value, "#d2d2d2", "#000000")
I have tried it in both Chrome and IE.
UPDATE: This only fails on text boxes. If I set the color of a line using the same expression, it works fine.
UPDATE 2: The problem exists on the server side. Previewing the form in Report Builder, the text colors exactly as it should. I checked the CSS classes that are auto-generated for the elements, and there is no color attribute when I use the expression. If I set the color directly, the color attribute exists in the CSS. Restarting SSRS service did not help.
=
- RoMEoMusTDiE