Solved

Current User As Parameter In Reporting Services

Posted on 2007-03-19
4
1,433 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
ID: 18751068
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
ID: 18751125
I'm trying to return the user that is logged to the network using his/her machine.
0
 
LVL 16

Expert Comment

by:rboyd56
ID: 18751245
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
ID: 18751779
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how the fundamental information of how to create a table.

829 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