简体   繁体   English

根据SSRS中的tablix隐藏或取消隐藏

[英]Hide or Unhide based on tablix in SSRS

I am supposed to show textbox based on Tablix. 我应该显示基于Tablix的文本框。 It will be appear on the page where the tablix exists. 它会出现在tablix所在的页面上。 It stops showing when the report page doesn't exist on the page. 当页面上不存在报告页面时,它将停止显示。 How can I achieve it? 我该如何实现? I am thinking of using reportItems but I don't know exactly how. 我正在考虑使用reportItems,但我不知道具体如何。 I have already one column in my tablix for using reportitem. 我的tablix中已经有一列用于使用reportitem。 Can I have two report items in the same tablix( that one I am not sure too)? 我可以在同一Tablix中有两个报告项目(我也不确定)吗? Am I clear in explaining my issue? 我清楚地解释了我的问题吗?

在此处输入图片说明

Rather than checking if the Tablix exists on a page, perhaps think about what data causes the Tablix to exist. 与其检查页面上是否存在Tablix,不如考虑是什么数据导致Tablix存在。

Say your Tablix is displaying data on dogs, but on one of your pages you don't have any valid dogs, so no Tablix. 假设您的Tablix正在显示狗的数据,但是在您的页面之一上您没有任何有效的狗,因此没有Tablix。 In this case you could check for this in the Hidden property of the Text Box: 在这种情况下,您可以在“文本框”的“ Hidden属性中进行检查:

=IIF(Count(Fields!DOG_ID.Value) = 0, True, False)

(For the opposite of this, a Tablix has a NoRowsMessage property you can set rather than needing an extra Text Box.) (与此相反,Tablix具有您可以设置的NoRowsMessage属性,而不需要额外的文本框。)

Goto the properties of the text box and then goto Visibility. 转到文本框的属性,然后转到“可见性”。 Select "Show or hide based on expression" and click on the [fx] button. 选择“基于表达式显示或隐藏”,然后单击[fx]按钮。

To show or hide depending if the Tablix returns any data or not: 根据Tablix是否返回任何数据来显示或隐藏:

Then enter the below: =iif(CountRows("NameOfTheDataseOfTheTablix") < 1,True, False) 然后输入以下内容:= iif(CountRows(“ NameOfTheDataseOfTheTablix”)<1,True,False)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM