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] "Matt" wrote:
> Thanks Charles,
>
> will give this a try
>
> "Charles Kangai" <CharlesKangai@discussions.microsoft.com> wrote in message
> news:749AF5F0-DBE7-40DF-ABCA-1C65045AE4F8@microsoft.com...
> > 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
> >
> >
> > "Matt" wrote:
> >
> > > 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
> > >
> > >
> > >
>
>
Try using the upper() or lower() functions on the @userid to make it match
the Users!UserID value...
[quoted text, click to view] "bamboo" wrote:
> 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?
>
> "Matt" wrote:
>
> > Thanks Charles,
> >
> > will give this a try
> >
> > "Charles Kangai" <CharlesKangai@discussions.microsoft.com> wrote in message
> > news:749AF5F0-DBE7-40DF-ABCA-1C65045AE4F8@microsoft.com...
> > > 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
> > >
> > >
> > > "Matt" wrote:
> > >
> > > > 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
> > > >
> > > >
> > > >
> >
> >
Don't see what you're looking for? Try a search.