Is it possible to get the current logged in Windwos user?
I know i can get User Info via USerInfo list on a sharepoint site, but i want to use the actual logged in system user as default value for a report parameter! Maybe a SQLite command similar to SELECT SYSTEM_USER for SQL Server.
Hi emu,
You can get the current user in Reporting Services, using User.UserID :
You would have this output:
Let me know if you need more details,
Regards, Marien MONNIER Enesys
@Marien MONNIER
Thanks that is what I was searching for. Is there also a buildtin function to get Last Name or Displayname? I mean i can work around using a join on the SharePoint user list to get what i want.
There is only the UserID available in the built-in functions. You can work around retrieving data from your user using the UserInfo list :
<root> <list title="UserInfo" relativeSiteUrl="/sites/ersdedemo/" tableName="UserInfo"> <fields>*</fields> <query> <Where> <Eq> <FieldRef Name="Name" /> <Value Type="Text">@User!</Value> </Eq> </Where> </query> </list> </root>