Link to home
Start Free TrialLog in
Avatar of aneilg
aneilgFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SSRS change text colour.

i want to change the colour of my text.
my textbox expression is '' so if there is no value set it to report not run.
but i also want to chaneg the colour to red.
=Iif(IsNothing(Fields!WhenRun.Value),"Report Not Run",Fields!WhenRun.Value)

so in my colour expression i have
=Iif(Fields!Max_Date.Value = "Report Not Run","Red","DimGray")

but all values are dimgray.
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What is Fields!Max_Date.Value?   Is this a datetime or string?   If it is a date, then condition will always be false since it cannot be equal to "Report Not Run" which is of string data type.  Therefore, it will always apply "DimGray" in your case.
Avatar of vikasbapat

Hello aneilg,
Can you try following-
Select the field for which you wish to change text color, from the Property window set following expression for  Value and Color of the field.

In the Value section expression goes like this -
=IIF(Fields!FieldName.Value = "", "Report Not Run", Fields!FieldName.Value)

In the Color section expression is this -
=IIF(Fields!FieldName.Value = "", "RED", "DIMGRAY")

Avatar of aneilg


thanks for you help guys.

jimhorn got it.
Avatar of aneilg


Thanks for the grade.  Good luck with your project.  -Jim