Groups | Blog | Home
all groups > sql server reporting services > march 2005 >

sql server reporting services : Sending UserID to the Stored Procedure/SQL server


Ravi R
3/1/2005 6:49:33 PM
Hello all,

I would like to know if there is anyway to send the UserID of the
person running reports to the SQL server as a parameter to the stored
procedure or sthg like that ?

Currently we are using the default interface of the RS. Not implemented
Forms Auth and havent integrated RS into a Web app.

I donno anything about Forms Auth, but would like to know if it
provides a comprehensive logging facility where I can have info of a
User, the reports he ran etc.

Thanks
Ravi
Bruce L-C [MVP]
3/1/2005 10:08:10 PM
Forms authentication is just a way to have your own authentication, it does
not provide any new features.

As far as sending a the userid that is easy. What you need to do is map the
query parameter to the global variable User!userid (that is from memory so
it might be slightly different. To do this in the data tab click on ..., go
to the parameter tab. For your query parameter (which will be currently
mapped to a report parameter) on the right column pick expression which
brings you to the expression builder. The select this from the global
variables. Note that the userid will also have your domain ( like
domainname\userid) so if you want just the userid you will need to strip off
the domainname in your stored procedure).

This global variable is the user of the report, it is not the user used to
get the data (which is how it should be, I always have a specific readonly
user that is used for the data source).

--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Ravi R
3/2/2005 4:52:49 PM
Bruce,

Thanks for the reply. I used it and it works. I get the UserID of the
Windows User. My project is currently in the development stages.
Currently using windows integrated security and also tried the SQL user
authentication. The server is in a DMZ. Would like to know if you can
give hints regarding the most appropriate authentication mechanism.
The final product is gonna be RS accessed thru an ASP.NET web app.

Thanks very much
Ravi
Bruce L-C [MVP]
3/3/2005 7:58:44 AM
If you use forms authentication you should still get the id of the user
using the report. I have not used forms authentication. Also, I am not sure
what happens with the level of indirection (when using URL or webservices
integration with a web app). I think you are still OK but I am not positive.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Jeff A. Stucker
3/3/2005 9:11:18 AM
Does your ASP.NET web app have forms authentication to identify users? If
so, that would be the best mechanism for report authentication. If your
ASP.NET web app is protected via Windows authentication, that would be the
best mechanism.

The forms authentication solution (or any other custom security extension)
is for single sign on capabilities between RS and the rest of your system.
So it's whatever is the rest of your system that determines the answer to
your question.

--
Cheers,

'(' Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button