简体   繁体   English

SSRS-过滤报告表中的表达式

[英]SSRS - filter on expression in report table

Let's say I have a report with following table in the body: 假设我有一个包含以下表格的报告:

ID | Name     | FirstName  | GivenCity | RecordedCity | IsCorrectCity
1  | Gates    | Bill       | London    | New York     | No
2  | McCain   | John       | Brussels  | Brussels     | Yes
3  | Bullock  | Lili       | London    | London       | Yes
4  | Bravo    | Johnny     | Paris     | Las Vegas    | No

The column IsCorrectCity Basically includes an expression that checkes GivenCity and RecordedCity and returns a No if different or a Yes when equal. IsCorrectCity列基本上包含一个表达式,该表达式GivenCityRecordedCity并在No同时返回No ,在相等时返回Yes

Is it possible to add a report filter on the column IsCorrectCity (and how) so the users will be able to just select all records with No or Yes ? 是否可以在IsCorrectCityIsCorrectCity (以及如何添加)报告过滤器,以便用户能够仅选择NoYes所有记录? I know this can be done with a parameter in the SQL query, but I would like to add it based on the expressions rather then adding more calculations and all to the query. 我知道可以使用SQL查询中的参数来完成此操作,但我想根据表达式添加它,而不是添加更多计算并全部添加到查询中。

Here's a tutorial which explains how you can do it 这是一个教程 ,解释了如何做到这一点

Filtering Data Without Changing Dataset [SSRS] 在不更改数据集的情况下过滤数据[SSRS]

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

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