Link to home
Start Free TrialLog in
Avatar of mlehnen
mlehnenFlag for United States of America

asked on

SSRS Switch to evaluate

I'm trying to use Switch to color code cells on a report.  I'm trying to evaluate a string and color code a "days outstanding" cell if the number of days exceeds a threshold.  Currently I get the following error:

[rsRuntimeErrorInExpression] The BackgroundColor expression for the text box ‘Textbox49’ contains an error: Argument 'VarExpr' is not a valid value.

I'm using the Switch expression since I'll have about 10 different values to compare.



=Switch(Fields!String1.Value = "Bank of America" and DateDiff("d", today(), Fields!Date1.Value)*-1 >14, "Red", "Transparent")

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of ValentinoV
ValentinoV
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mlehnen

ASKER

That worked perfectly by adding the additional argument.  Thank you!