简体   繁体   English

如何根据用户SSRS角色分配在SSRS中过滤数据

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

Suppose i have 1000 rows in a dataset. 假设我在数据集中有1000行。 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. 我想要创建一个报表,该报表可供组织中的所有用户访问,但有一个STRICT要求,即用户只能查看其办公室/部门的数据。 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. 我正在考虑创建与可用办公室相对应的ssrs角色,然后将office / department列与用户角色匹配,但是似乎并没有在SSRS中获得当前用户的角色名称。 I'm only seeing User!UserID . 我只看到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. 如您所见,用户ID是您在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. 因此,您需要访问定义了正确映射的表。

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

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