[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 394
  • Last Modified:

How do you retrieve Windows XP user id after .rdl uploaded to sql report server

Using Sql 2005   VS 2005  to create this Report.

I created a ssrs report. In the report is a dropdown. Depending on the Windows user id, I will default something in the Dropdown box. The stored procedure that is used to create the dropdown retrieves the windows user id with no problems (on my desktop).
Once I upload the .rdl to the sql Report Server, the user id is now the generic id assigned to that report server. Once on the report server, I need to access the original Windows user id not the sql report server id.

** The users Pin# is part of the Windows User Id. I need this pin#

Can this be done?  Everything I read say No.
0
thayduck
Asked:
thayduck
  • 2
  • 2
1 Solution
 
ezraaCommented:
When you create your datasource you can specify that the connection should use Integrated Security and will use the credentials of the user that runs the reports.

If that is not what you are looking for, you can run the report through a report viewer control in a custom web application (an .aspx file) and pass the username as a parameter to the report.  If you want an example of that let me know.
0
 
thayduckAuthor Commented:
Do have Intergrated Security Checked. Not sure how you tell datasource to use the credentials of the user that runs the reports.

This report is part of a bigger system (many reports) out of my control, so a report viewer control is not in the cards.
0
 
ezraaCommented:
AFAIK, There is no way you can do this using only the rdl file.  At a minimum you would need to modify the Reporting Server ReportViewer.aspx page to have it pass the username to the report.  But, if you can't even modify that - then I think you are out of luck.
0
 
thayduckAuthor Commented:
I found answer to my problem here and it worked for me.
http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/5bef3192-10d2-460d-9897-ad05239c61e2/
 
I created a dataset within my ssrs report that will call Stored procdeure  SP123. The dataset will pass a parm to SP123 called parm123 with a value of  =User!UserID (from Global parms).
Now when I access that report from the remote report server, I am accessing the Users Windows Userid not the remote server ID when building my dropdown (using that dataset).
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now