SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a SharePoint 2010 with Reporting Services in Integrated Mode.

I would like to be able to get the current user from the report code and use it as parameter.

but when I use the SPContext.Current.Web.CurrentUser.Name, I get all the time system account.

Any idea how to get the actual logged user ?


share|improve this question
up vote 4 down vote accepted

In the Expressions dialog box of your report builder you can use the global variable UserId. Alternative, create a custom webpart which renders an Iframe (URL = reportviewerpage). Pass the current user data as a querystring. Use the querystring value (report parameter) in your report query.

share|improve this answer
snap, how could I missed that !!! – GillouX Oct 22 '11 at 8:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.