SQL SSRS-一份报告中的几个条件
我正在创建具有多个条件的表格报告.举个例子,条件可以是以下之一:
I am creating a tabular report with several conditions. As a case in point, the conditions could be either of these:
X 为空
X 不为 NULL
X 喜欢%Y%"
我想创建一种能够选择上述条件之一的钻取报告.
I want to create a kind of drill through report with the capability of selecting one of the above conditions.
现在我正在创建三个表并使用 IIF 来查看每个表的可见性.我将参数添加到可见性,通过选择一个条件,相关表变为可见,而另外两个变为隐藏.
但我只想到一个带有选择所需条件的参数的表格.
Now I am creating three tables and use IIF for the visibility of each. I add the parameter to visibility and by selecting one condition the related table becomes visible and the other two becomes hidden.
But I am thinking of just a single table with a parameter for selecting desired condition.
不要使用可见性表达式,而是将其添加为过滤器.这将只显示与表达式匹配的行.你可以这样做:
Instead of using a visibility expression, add it as a filter. This will only show rows that match the expression. You can do something like this:
表达式:=真"
运算符:=
值:IIF(Parameters!Status.Label = "NULL", "TRUE", "FALSE")
Value: IIF(Parameters!Status.Label = "NULL", "TRUE", "FALSE")