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

你。 提交于 2020-01-20 08:03:59

问题


I have an RDLC report showing a table. A certain row in this table should not appear in some conditions apply. I was able to set the Hidden property to false using an expression if these conditions apply.

The problem is that, though hidden, the row is still taking place in the table, i.e. it is not collapsed.

How can I collapse it rather than simply hide it?

I am using RDLC with report viewer 2010 SP1


回答1:


Check this solution

set Hidden property to True or False

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

Also check expression examples

Hope this answer help you.




回答2:


Despite the insistance that their solution works, the Hidden property still makes the row take up space. No big deal if it is the last row, but when it is between rows it can be a big deal. And Can Shrink is no help either. The solution to collapse the row is the right-click the row header and select Row Visibility..., then enter the expression that will evaluate to true or false.




回答3:


Make sure that CanShrink is set to true.



来源:https://stackoverflow.com/questions/7489357/how-to-collapse-a-row-in-rdlc-rather-than-just-hide-it

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