Is it possible to pass information from the user that is running a report from Report Manager as a filter for the report? For example, if I only want a person to see information for their department on a report, is there a way to identify their department from their user information and use it as a filter for the report?
There is a built-in field called UserId in SSRS that you can use to get the logged in user. One way would be to define an internal parameter with the default value being this build-in UserId field and send that parameter to your query. Then, in the SQL query, you can filter based on the user.
If you want to filter based on a department, then you can store the UserId to Department relation in SQL table and use that table to determine which department the user belongs to and filter accordingly.
I created a view that has LDAP info for all our users that includes their Employee Number, Department Number and Login Name.
I can match the built-in field UserID (=User!UserID) to the Login Name field in my view but I don't know how to use this to filter my records so I only see records from the UserID's Department number.
I have tried adding the view as a second "LDAP Info" dataset and then in my Main dataset creating a parameter for =User!UserID and naming it ReportUser. I do not know how to filter my Main dataset for the Department Numbers that match the UserID department number in my second dataset.