Set a table's visibility to false when it has no rows (in reporting services)

独自空忆成欢 提交于 2019-12-03 05:25:53

问题


Is there a way to set a table's visibility to false, if the table has no rows?

I want to hide a table in Reporting Services when it has no rows.

Setting NoRows to ="" isn't sufficient in this case as space is still left for the table, and some of the table's formatting is still visible.

I'm using Microsoft Visual Studio / SQL Reporting Services 2005


回答1:


Try setting the table's "Visibility.Hidden" property to this expression:

=CountRows() = 0



回答2:


Found the answer on my own, it's pretty simple.

I found this article which mentions the CountRows() function.

So to set the Visibilty / Hidden property to hide when there are no rows, it's simply

= Iif (CountRows() > 0, false, true)


来源:https://stackoverflow.com/questions/514043/set-a-tables-visibility-to-false-when-it-has-no-rows-in-reporting-services

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