I have an SSRS report which will list information depending on which employee runs the report.
I want the information to be 100% unique to each employee therefore, I want the report to automatically determine who the employee is based on their windows login.
In SQL, I can do this by executing the following:
SELECT HOST_NAME() AS HostName, SUSER_NAME() LoggedInUser
This returns the following data:
+--------------+--------------------+
| HostName | LoggedInUser |
+--------------+--------------------+
| MCC-ASUSN53S | MCCOSKERS\PGunston |
+--------------+--------------------+
The above works in SSRS too however, it returns details based on the SQL Server, NOT the machine which the report is being accessed from.
Is there a way to achieve what I am attempting?
To retrieve the user accessing the report, you can use User!UserID
variable from the User
collection.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments