SQL Blog - Pieter van Maasdam, Macaw

SSIS, SSAS, SSRS & other SQL-things I come across...

October 2007 - Posts

SSRS - Report filter based on logged in user account

For a report in our organisation we wanted to have the filtering in the report to be based on the login name of the user. The data source is an SSAS cube, so we solved it by adding the AD login name to the Employee dimension and adding a filter to the report in which we put the login name with MDX.

  • Just create a new report and setup a filter
  • Select the Employee dimension
  • Select the attribute for the login name
  • For the operator, select MDX
  • Enter the following expression: STRTOMEMBER("[Employee].[Login Name].[" + username + "]")

 

ReportBasedOnADLoginname

 

 

Posted 23 October 2007 12:53 by Repieter | with no comments