SQL Reporting Services Expression to evaluate if field is null &| white space
I'm making a report and in a text box I want to show the Tax ID of a entity if one exists. However if a tax ID doesn't exist then that field is just white space. So if the field is white space I want to show nothing in the text box.
IIF(IsNothing(Fields!TAX_ID.Value), "", "Tax ID: " & vbCrLf & Fields!TAX_ID.Value)
What 开发者_运维百科do I do?
However IsNothing might not always evaluate it properly. Might try:
IIF(Trim(Fields!TAX_ID.Value) = "", "", "Tax ID: " & vbCrLf & Fields!TAX_ID.Value)
To compare it to a null value, in VB, this is how you do it:
IIF(Trim(Fields!TAX_ID.Value) is nothing , "", "Tax ID: " & vbCrLf & Fields!TAX_ID.Value)
精彩评论