Reputation: 41
I am attempting to make the fill color of the entire row of cells red if a certain values are NULL so I am applying the expression to all cells in the row. The cells that I am applying the fill expression won't necessarily include the field at the top level. I'm finding that the expression I am using is leaving the row white even though my final else is blue. I am also getting the warning "[rsRuntimeErrorInExpression] The BackgroundColor expression for the text box contains an error: Input string was not in a correct format". Hope this makes sense. See example below:
Table Columns: Account1, Account2, Account3
Fill Expression applied to all 3 columns:
=IIF(Fields!Account1.Value = "", "Red", IIF(Fields!Account2.Value = "", "Red", "Blue"))
Upvotes: 0
Views: 334
Reputation: 2507
You need to use IsNothing
instead of checking for an empty string. An empty string is something whereas NULL is unknown and needs to be handled differently.
=IIf(IsNothing(Fields!Account1.Value), "Red",
IIf(IsNothing(Fields!Account2.Value), "Red", "Blue"))
Upvotes: 1