我正在使用ReportBuilder 3.0,我有一个5参数的报告,第一个参数提供了带回所有数据或是否过滤的选项。
我的报告基本上由两个都有许多图表的矩形组成。我为它设置的第一个矩形仅在将@ReportSelection参数选择为“所有”时显示。
第二个矩形仅在@ReportSelection设置为'Drillthrough'时显示。用户可以选择其他参数来执行此操作。
我需要的是,当用户选择'Everything'时,我希望其他参数被隐藏(尽管看起来不可能)或至少默认为'Not Applicable'。
我的第一个参数看起来像这样-@param
第二个基于查询-@ sdg
select distinct sdg from [dbo].[Table] where (@param ='2' or @param = '1') order by 1 asc
第三参数-@ la
select distinct localauthority from( select distinct localauthority, sdg from [dbo].[Table] )as A where (sdg in (@sdg) and (@param ='2' or @param ='1')) order by 1 asc
第四参数-@ Ward
select distinct ward from( select distinct ward, localauthority from [dbo].[table)as A where (localauthority in (@la) and (@param ='2' or @param ='1')) order by 1 asc
我已经尝试将表达式放在参数的默认部分中,但是没有影响。
=IIF(Parameters!ReportSelection.value = "Everything" , "N/A")," "")
这是我找到的关于如何执行的最佳描述,但我正在努力将其实施以进行挖掘。
https://dzone.com/articles/how-to-creat-multi-option-parameter-report-in-sql
我正在使用ReportBuilder 3.0,我有一个5参数的报告,第一个参数提供了带回所有数据或是否过滤的选项。我的报告基本上由两个矩形组成,两个矩形都...
最终设法以50点的声誉进行了分类,哦。在“ Everything”字段中为每个参数创建一个Union。然后将所有参数的默认值设置为“ Everything”。它远非完美,但可以完成