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 ?



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.

  • snap, how could I missed that !!! – GillouX Oct 22 '11 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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