Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 ?

thx

share|improve this question
add comment

1 Answer

up vote 3 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
add comment

Your Answer

 
discard

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.