本文介绍了Reporting Services 2008:在参数中使用user!userid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有参数的报告,该参数由查询返回的销售代表列表填充.我想根据运行报告的用户的安全权限来过滤该列表.
I have a report with a parameter that is populated by a list of sales representatives returned by a query. I want to filter that list based on security rights of the user running the report.
为了使查询工作,我需要将user!userID传递给数据库.我尝试过这样的事情:
In order to make the query work I need to pass the user!userID to the db. I tried something like this:
......其中UserName = user!UserID ...
...where UserName = user!UserID...
但是它不喜欢语法.
推荐答案
将查询更改为:
where UserName = @user
...,然后在参数"标签中,将"User!UserID"分配给"@user"参数.
... and in the "Parameters" tab, assign "User!UserID" to the "@user" parameter.
这篇关于Reporting Services 2008:在参数中使用user!userid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!