SQL Server Reporting Services - 禁止自由格式报告中的空行

mar*_*c_s 1 reportingservices-2005 reporting-services

我有一个基于ListSQL Server Reporting Services中的控件的自由格式报表,基本上显示公司的地址:

Company Name
Address 1
Address 2
ZipCode City
Run Code Online (Sandbox Code Playgroud)

但是,我的一些公司记录没有该Address2字段的值- 在这种情况下,我想完全删除Textbox包含不存在的Address2数据的行(即)- 所以它应该类似于:

Company Name
Address 1
ZipCode City
Run Code Online (Sandbox Code Playgroud)

我可以很好地设置报表上的Hidden属性Textbox- 但是只会导致文本框被隐藏 - 并且空白行显示以前的位置Address2....我想要抑制该空白行.怎么样?!?!

我不在Tablix或类似的东西里面 - 它只是报告上的自由形式文本框.有没有机会让这个做我想做的事情而不需要付出巨大的努力?

csn*_*910 7

将所有字段放在一行中,如果需要换行,请在每个字段前检查.

例如:

[Name1]«Expr»[Name2]«Expr»[Name3]
[Street]
[City]
Run Code Online (Sandbox Code Playgroud)

使用表达式:

=Iif(Fields!Name2.Value="",Nothing,vbCRLF)
=Iif(Fields!Name3.Value="",Nothing,vbCRLF) 
Run Code Online (Sandbox Code Playgroud)