• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1450
  • Last Modified:

Current User As Parameter In Reporting Services

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?
  • 2
  • 2
1 Solution
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?
nito8300Author Commented:
I'm trying to return the user that is logged to the network using his/her machine.
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.
nito8300Author Commented:
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'

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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