Hide a tablerow in a .NET rdlc report if the field represented in the row is empty? [duplicate]

守給你的承諾、 提交于 2019-12-11 08:46:52

问题


Possible Duplicate:
How to collapse a row in RDLC rather than just hide it?

I see the tablerow.Visibility property and another property called 'ToggleItem' but am not sure how to make this work. I want to hide the tablerow dynamically if it's only text field (in this case a user comment field) is empty. 'CanShrink' doesn't seem to do the job.

The tablerow is .25 inches high and it takes up this much space even if there is no data to display. Therefore, I end up with .25 inch gap between every row on the report.

I am using Visual Studio 2005 with the built in rdlc reports capability.


回答1:


Just set Hidden property to True or False or some expression.

= (Fields!UserComment.Value.ToString() = "")  

See Expression Examples (Reporting Services)



来源:https://stackoverflow.com/questions/627647/hide-a-tablerow-in-a-net-rdlc-report-if-the-field-represented-in-the-row-is-emp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!