Unanswered: Conditional Formatting Expression Help
I'm trying to put conditional formatting on a field, that behaves as follows:
The data in the field is varchar, and sample data is either:
11.7 :1 (these are ratios of a sort)
I want to evaluate the first 3 characters of the string as numbers.
Mid(fieldvalue,1,3) = "3.0" or "11."
Any data that is greater than 1.99, I want to make the background dark red, anything else including nulls, zebra formatting. I have the following expression built so far and it appears to work, except when the value is null. If the value is null, it leaves the background color white. If you get a chance to take a look I appreciate any help. This is the warning: [rsRuntimeErrorInExpression] The BackgroundColor expression for the text box ‘Asthma’ contains an error: Input string was not in a correct format.
,(IIf(RowNumber(Nothing) Mod 2 = 0,"#b8cce4","#dbe5f1"))
,IIf(RowNumber(Nothing) Mod 2 = 0,"#b8cce4","#dbe5f1"))))
My logic is, if the field is null, zebra format, if mid of the value is > 1.99, dark red, everything else zebra formatting. As I said, this seems to work except for nulls.