开发者

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜