2

I am attempting to get user information from Microsoft Active Directory to appear in the footer of my reports.

I have tried:

=mid(User!UserID , InStr(User!UserID,"\")+1) 

=User!UserID 

neither return with the login name used to access windows from the lock screen.

I would like to Access the Username Field from Active Directory

RThomas
  • 10,702
  • 2
  • 48
  • 61

2 Answers2

0

This should work. I have been using this for years to display the users who ran the report.

="Report Generated by : " & User!UserID.Substring(User!UserID.LastIndexOf("\")+1)
Harry
  • 2,636
  • 1
  • 17
  • 29
  • I think my issue may be a little more complex because this only pulls the information for the username logged in the server where the data is coming from instead of the user logged into the system (Desktop Computer) where the report printing is being requested. – Brian Payne May 22 '19 at 16:07
  • It should give you the local AD account that is logged into the computer.. not from the data source credentials.. Almost everyone uses it this way (that I know of) and the outcome is the same! – Harry May 22 '19 at 20:42
  • 1
    I just use `=User!UserID` which gives `DOMAIN\User`. My reports all use a fixed sql login (rsDataReader) but the above always gives the name of the actual user. – Alan Schofield May 22 '19 at 22:02
0

I ended up locating the user logged into the specific program and pulled the data I needed that way through Report Meta Data. =First(Fields!User.Value, "ReportMeta")