Avatar of aneilg
aneilg
Flag 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.
SSRS

Avatar of undefined
Last Comment
Jim Horn

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Jim Horn

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Alfred A.

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.
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")

Thanks.
aneilg

ASKER
thanks for you help guys.

jimhorn got it.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
aneilg

ASKER
thanks.
Jim Horn

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