I am using the following expression in a local report for a WinForms application, but I receive "#Error" when the field value is null:
=IIf(Fields!MyField.Value = "", "NULL", Left(Fields!MyField.Value, Len(Fields!MyField.Value) - 2))
I am doing this to strip off a trailing comma and space of the value. The IIf() works, the Left() works, and the Len() works... but not when I add in the "- 2" part of the expression.
I assumed null values (or ZLSs) would be a non-issue since I am pulling them out before the latter half of the expression is evaluated.
Any ideas what might be causing this? Assistance is greatly appreciated!