我要在报告中添加人员姓名,他们的组织和地址栏。有时,Applicant_Organization为NULL。发生这种情况时,我想省略该行。使用我拥有的代码,当Applicant_Organization值没有值时,在“申请人名称”下方显示一个空行。如何解决呢?
=UCase(First(Fields!Applicant_Name.Value, "DataSet1") & Chr(10) & Chr(13) &
First(Fields!Applicant_Organization.Value, "DataSet1") & Chr(10) & Chr(13) &
First(Fields!Applicant_Address_Block.Value, "DataSet1"))
谢谢您的帮助。
答案 0 :(得分:0)
尝试一下。我们在这里所做的只是测试组织是否为空/空/空,然后追加一个空字符串,如果不为空,则添加值和新行。
=UCase(First(Fields!Applicant_Name.Value, "DataSet1") & Chr(10) & Chr(13) &
IIF(LEN(First(Fields!Applicant_Organization.Value, "DataSet1")) = 0 , "", First(Fields!Applicant_Organization.Value, "DataSet1") & Chr(10) & Chr(13)) &
First(Fields!Applicant_Address_Block.Value, "DataSet1"))
答案 1 :(得分:0)
您可以使用IsNothing()函数:
例如:
=UCase(First(Fields!Applicant_Name.Value, "DataSet1") & Chr(10) & Chr(13) &
IIF(IsNothing(First(Fields!Applicant_Organization.Value, "DataSet1")), "", First(Fields!Applicant_Organization.Value, "DataSet1") & Chr(10) & Chr(13)) &
First(Fields!Applicant_Address_Block.Value, "DataSet1"))