Solved

Current User As Parameter In Reporting Services

Posted on 2007-03-19
4
1,423 Views
Last Modified: 2008-02-01
Hello,
I'm trying to create a report that displays data based on the user's login. I'm using WinNt integrated security but i can't seem to display the current logged on user. It keeps displaying the nt account i use to manage the sql server.

I've tried:
select system_user as userid
also tried
select SUSER_SNAME()

none seem to work.  any ideas?
0
Comment
Question by:nito8300
  • 2
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
rboyd56 earned 500 total points
Comment Utility
Select select system_user returns the user that made the connection to SQL Server, as does select SUSER_SNAME().

It should not return any information than that.


<I'm trying to create a report that displays data based on the user's login>
Which login are you referring to?
0
 
LVL 9

Author Comment

by:nito8300
Comment Utility
I'm trying to return the user that is logged to the network using his/her machine.
0
 
LVL 16

Expert Comment

by:rboyd56
Comment Utility
Reporting server is problably connecting using a different user so that is why the value you want is not being returned.

There is no TSQL command to get the actual login name in that situation.
0
 
LVL 9

Author Comment

by:nito8300
Comment Utility
found out what the problem was.
1st i had use annonymous access enabled - which was making everything work. once i disabled it i had another problem, users couldn't get to the reports. i then i had to add 'Everyone' to the folder 'ReportServer'

thanks
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now