all groups > sql server reporting services > november 2004 >
You're in the

sql server reporting services

group:

Using User ID to get list of allowed values



RE: Using User ID to get list of allowed values Charles Kangai
11/25/2004 1:01:05 AM
sql server reporting services: Re-write the query with a parameter as below. Then configure the
corresponding report parameter to have a default of User!UserID

SELECT Key ,Value FROM Table
WHERE UserID = @userid

Charles Kangai, MCT, MCDBA


[quoted text, click to view]
Using User ID to get list of allowed values Matt
11/25/2004 12:23:34 PM
Hi,

I wish to restrict the allowed values for selection for a report parameter
based on the current user. The query is a selection from the database, I
just need to work out how I can pass the user id to the query. Users!UserID
fails in a query due to a syntax error.

ie.

SELECT
Key
,Value
FROM
Table
WHERE
UserID = Users!UserID

thanks

Matt

Re: Using User ID to get list of allowed values bamboo
12/1/2004 9:09:06 AM
The problem is that the built in field "UserID" is case-sensitive. My
domain/username has the domain portion not capitalized where, the "UserID"
domain is capitalized. Reporting services does recognize this and treats
them as 2 different entities.

Any way around this?

[quoted text, click to view]
Re: Using User ID to get list of allowed values Matt
12/1/2004 1:43:04 PM
Thanks Charles,

will give this a try

[quoted text, click to view]

Re: Using User ID to get list of allowed values Ben Sullins
1/25/2005 8:05:04 AM
Try using the upper() or lower() functions on the @userid to make it match
the Users!UserID value...

[quoted text, click to view]
AddThis Social Bookmark Button