RDLC 报表隐藏空列
RDLC Report hiding empty columns
我有一个带有列的 Tablix,我添加了这个表达式来显示该列中的数据:
=Fields!PhoneNumber.Value & System.Environment.NewLine & Fields!Email.Value & System.Environment.NewLine & Fields!Address.Value
我想要的是当一个或多个字段(PhoneNumber、Email、Address)为空时,表达式只显示非空字段并且不换行
怎么做?
为什么不加入 IIF() 以仅在存在值时添加新行
=iif( string.IsNullOrWhiteSpace( Fields!PhoneNumber.Value ), '', Fields!PhoneNumber.Value & System.Environment.NewLine )
& iif( string.IsNullOrWhiteSpace( Fields!EMail.Value ), '', Fields!Email.Value & System.Environment.NewLine ) & Fields!Address.Value
虽然可能会很长。
我有一个带有列的 Tablix,我添加了这个表达式来显示该列中的数据:
=Fields!PhoneNumber.Value & System.Environment.NewLine & Fields!Email.Value & System.Environment.NewLine & Fields!Address.Value
我想要的是当一个或多个字段(PhoneNumber、Email、Address)为空时,表达式只显示非空字段并且不换行
怎么做?
为什么不加入 IIF() 以仅在存在值时添加新行
=iif( string.IsNullOrWhiteSpace( Fields!PhoneNumber.Value ), '', Fields!PhoneNumber.Value & System.Environment.NewLine )
& iif( string.IsNullOrWhiteSpace( Fields!EMail.Value ), '', Fields!Email.Value & System.Environment.NewLine ) & Fields!Address.Value
虽然可能会很长。