Reporting Services 2008:在参数中使用 user!userid [英] Reporting Services 2008: Using user!userid in Parameters

查看:14
本文介绍了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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆