根据子报表中的值隐藏Tablix行

根据子报表中的值隐藏Tablix行

本文介绍了SQL Server报表生成器:根据子报表中的值隐藏Tablix行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对SQL Server Report Builder不太熟悉,并且具有Crystal Reports的经验,因此您可以在报表的标题中声明一个变量,使用子报表设置该变量,然后在Windows中引用该变量。主要报表,因此我在适应SQL Server报表生成器时遇到问题。

I am not too familiar with SQL Server Report Builder and have had prior experience with Crystal Reports, whereby you could declare a variable in the header of the report, set that variable using a sub-report, and then reference that variable in the main report, so I am having issues adapting to SQL Server Report Builder.

我有一个显示数据的Tablix。在tablix列之一中,我嵌入了一个子报告。我想根据子报表显示的值隐藏tablix行。是否可以使用SQL Server报表生成器来执行此操作?

I have a tablix that displays data. In one of the tablix columns I've embedded a sub-report. I would like to hide the tablix row based upon a value surfaced by the sub-report. Is there any way to do this using SQL Server Report Builder?

推荐答案

您不能通过子变量传递变量或参数,向ssrs报告父报告。您只能以参数的形式将变量从父报表传递到子报表。

You can not pass a variable or parameter from a sub-report to the parent report in ssrs. You can only pass variables to sub-reports from the parent report in the form of parameters.

您将需要在父报表中设置逻辑,以便提前知道保存该子报表的列还是配置子报表以能够打印为空白并切换可见性。

You will need to set up logic in the parent report to know in advance if the column holding that child report should be rendered or configure the sub-report to be able to print as blank and toggle the visibility there.

这篇关于SQL Server报表生成器:根据子报表中的值隐藏Tablix行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 00:15