Solved

Current User As Parameter In Reporting Services

Posted on 2007-03-19
4
1,439 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

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…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

623 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