A bit of code from SQL Server Magazine on handling column specific security based on userid that is found in SSRS.
Function HideThisColumnFrom(strUserID as String) as Boolean
Select Case strUserID
Case "domain\user1" : Return False
Case "domain\user2" : Return False
Case Else : Return True
End Select
End Function
Not ideal, and it is suggested using SQL Server to house a table of users, etc....
I think it would be best to write a sql scalar function that accepts a userid and based on permissions/roles send back either a bit-string or a string of roles separated by a delimiter which then can be deciphered by a function on the SSRS side. The function then would determine by sending in the roles into the function and return the True/False.
Function HideThisColumnFrom(strUserID as String) as Boolean
Select Case strUserID
Case "domain\user1" : Return False
Case "domain\user2" : Return False
Case Else : Return True
End Select
End Function
Not ideal, and it is suggested using SQL Server to house a table of users, etc....
I think it would be best to write a sql scalar function that accepts a userid and based on permissions/roles send back either a bit-string or a string of roles separated by a delimiter which then can be deciphered by a function on the SSRS side. The function then would determine by sending in the roles into the function and return the True/False.