简体   繁体   中英

How to filter data in SSRS based on the users SSRS role assignment

Suppose i have 1000 rows in a dataset. The rows have an office/department column. What i would want is to create one report accessible by all users in the organisation but with a STRICT requirement that users should only view data for their office/department. ie where office/department column value matches the office they belong to.

I'm thinking along the line of creating ssrs roles corresponding to the available offices & then matching the office/department column with the users role but there doesn't seem to be away of getting the current user's role name in SSRS. I'm only seeing User!UserID .

What would be the best reliable and easy to maintain way of handing this kind of requirement?

As you discovered, the User ID is all you have to work with in SSRS. You'll need to use that to lookup what their roles and permissions should be. So you'll need access to tables that have the correct mapping defined.

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