I am doing a report, and in the text box I want to show the tax ID for the object, if one exists. However, if the tax ID does not exist, this field is simply white. Therefore, if the field is empty, I want to not show anything in the text field.
IIF(IsNothing(Fields!TAX_ID.Value), "", "Tax ID: " & vbCrLf & Fields!TAX_ID.Value)
What should I do?
However, IsNothing may not always evaluate it correctly. I can try:
IIF(Trim(Fields!TAX_ID.Value) = "", "", "Tax ID: " & vbCrLf & Fields!TAX_ID.Value)
To compare it to a null value in VB, here is how you do it:
IIF(Trim(Fields!TAX_ID.Value) is nothing , "", "Tax ID: " & vbCrLf & Fields!TAX_ID.Value)