Friday, March 23, 2012

Name of User Requesting Report

I have several reports that need a parameter for logon name. How can I get
the name of the user requesting the report so I can use that in a parameter
for the report query?
Thanks for any helpThere is a global value of UserID that you can assign to the report
parameter in an expression. Its value is the domain\userid for the
connected user.
example:
=Globals!UserID
You can assign it to a stored procedure paramter in the parameter tab
of the data set editor. Be sure to use the CommandType of
"StoredProcedure" and not "Text" when configuring the data set.
Regards,
Clayton
Scott Duckworth wrote:
> I have several reports that need a parameter for logon name. How can I get
> the name of the user requesting the report so I can use that in a parameter
> for the report query?
> Thanks for any help|||Thanks for the help.
"SQLMonger" <claytongroom@.gmail.com> wrote in message
news:1120842855.113091.85050@.z14g2000cwz.googlegroups.com...
> There is a global value of UserID that you can assign to the report
> parameter in an expression. Its value is the domain\userid for the
> connected user.
> example:
> =Globals!UserID
> You can assign it to a stored procedure paramter in the parameter tab
> of the data set editor. Be sure to use the CommandType of
> "StoredProcedure" and not "Text" when configuring the data set.
> Regards,
> Clayton
> Scott Duckworth wrote:
> > I have several reports that need a parameter for logon name. How can I
get
> > the name of the user requesting the report so I can use that in a
parameter
> > for the report query?
> >
> > Thanks for any help
>sql

No comments:

Post a Comment