AD、SSRS 和参数下拉列表
我们公司有 46 栋建筑物,我们希望编写允许所有建筑物查看其数据的报告。我们为另一个应用程序创建了 46 个 AD 组。我想做的是填充一个包含建筑物名称的下拉参数,但仅根据您在 AD 中的访问权限显示它们。
例子: Administrator1 有权访问 Building1。他在第 1 组。
Administrator1 有权访问 Building2。他在第 2 组。
Regional1 可以访问 1-5 号楼。她在第 1 组、第 2 组、第 3 组、第 4 组和第 5 组 Exec1 可以访问所有建筑物。她在所有组中。
Exec1 会看到所有建筑物,Admins 只会看到他们的建筑物,Regional 会看到建筑物组。我可以仅使用这些人在点击报告时基于查找得到的值来填充参数下拉列表吗?
We have 46 buildings in our company and we want to write reports that allow all buildings to see their data. We have 46 AD groups we've created for another application. What I'd like to do is to populate a dropdown parameter full of the building names, but only show them based on your access in AD.
example:
Administrator1 has access to Building1. He is in group1.
Administrator1 has access to Building2. He is in group2.
Regional1 has access to buildings 1-5. She is in group1, group2, group3, group4, and group5
Exec1 has access to all buildings. She is in all groups.
Exec1 would see all buildings, Admins only their buildings and Regional the group of buildings. Can I populate a parameter dropdown with only the values these people have based on a lookup when they hit the report?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用了几种方法来解决类似的问题:
首先为报告创建一个内部参数,其中将包含用户的 ID。 “=用户!用户ID”
接下来,您需要加入权限。如果您让用户在 SQL 中的某个位置进行分组/权限映射,那么这是最简单的。那么这只是一个 SQL 连接。
否则,您可以设置一个 Active Directory“链接服务器”,它可以查询 AD 中的组成员。这可能需要一些耐心和故障排除时间。设置后,您可以加入每个组的成员资格。
如果我正在构建您所描述的内容,我将编写一个 AD 到 SQL 数据导出的代码,以便定期运行(.NET .exe),从而使 SQL 表保持最新的权限。这比 SQL-> 更容易设置并且更健壮。 AD 链接服务器。
如果有帮助的话,我可以找到链接服务器方法的参考文献......
I've used a couple of methods to solve similar problems:
First create an internal parameter for the report which will contain the user's id. "=User!UserID"
Next you need to get the permissions joined in. This is easiest if you have the user to group/permission mapping somewhere in SQL. Then this is just a SQL join.
Otherwise, you can set up a Active Directory "Linked Server" which can query AD for group members. This can take some patience and troubleshooting time. Once set up, you can join to the membership of each group.
If I were building what you describe, I would code an AD to SQL data export to run at regular intervals (a .NET .exe), keeping a SQL table up to date with permissions. This would be easier to set up and more robust than the SQL-> AD Linked Server.
I can find references for the linked server approach if that would be helpful...
如果您在 AD 中获取
memberOf
属性并使用数学正则表达式循环结果,我认为您可以构建您的组合。If you get the
memberOf
attribute in AD and loop on the result with a mathching regular expression, I think that you can build your combo.