Is there a reason you don't just use the User!UserID global variable.
Regardless, you do it the same way. Create a query parameter, then click on
the ... and go to the parameters tab. If it created the report parameter for
you, you want to map the query parameter to an expression rather than to the
report parameter. In the expression either call your code or use the User
global variable. If using the user global variable then the expression would
look like this:
= User!UserID
Note that this includes the domain so if your stored procedure doesn't want
it then you need to strip it off.
Also, in layout view, menu Report->Report Parameters and remove the report
parameter created automatically for you when you put in the query parameter.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
[quoted text, click to view] "G. Ray Giacalone" <rgiacalone@virtual.com> wrote in message
news:u7KBOupdFHA.2664@TK2MSFTNGP15.phx.gbl...
> The following will return the current login user's name through the Report
> Services Properties Code tab:
>
> 'Get the current login user's name
> Dim strCurrentUser As String
> Dim ident As System.Security.Principal.WindowsIdentity =
> System.Security.Principal.WindowsIdentity.GetCurrent()
> strCurrentUser = ident.Name
>
> Is there a way I can pass this as a parameter into a MS SQL Server 2000
> stored procedure for one of my Reporting Services data sets?
>
> Thanx!
>
>
>