Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Current User As Parameter In Reporting Services

Posted on 2007-03-19
4
Medium Priority
?
1,442 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 1500 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

670 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