开发者

SQL Reporting Services Expression to evaluate if field is null &| white space

开发者 https://www.devze.com 2022-12-18 15:55 出处:网络
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 wan

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

精彩评论

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