简体   繁体   中英

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.

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 ? 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.

Here's a tutorial which explains how you can do it

Filtering Data Without Changing Dataset [SSRS]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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