Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Report Model Security Expand / Collapse
Posted Wednesday, November 27, 2013 8:37 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, September 23, 2015 7:51 PM
Points: 32, Visits: 129
Hi All,

We have a SSRS Report Model published to multiple users across our business (Around 25 users from 5 different offices). the problem is all the users have access to data related to all the offices. we want to limit this so that people from a particular office should be able to see data that is related to their office only. How can this be done? please point me in the right direction.

Many Thanks in advance.
Post #1518102
Posted Monday, December 2, 2013 10:55 AM


Group: General Forum Members
Last Login: 2 days ago @ 12:23 PM
Points: 483, Visits: 1,091
Set up an internal report parameter called @UserID (or something), and set it equal to the report global User!UserID. Make sure it's at the top of the parm list in your report, so it is determined first.

Provided you have the per-user permissions defined somewhere in your db, you can then use that parm in a query to do filtering on, in your case, your "Office Parameter". For example :

---totally made up query for Office parm dropdown ---
Id, Description
FROM Office AS O
INNER JOIN OfficePermissions AS OP ON O.OfficeID = OP.OfficeID
INNER JOIN Users as U ON OP.UserID = U.UserID
WHERE U.UserID = @UserID

Hope that helps!

Post #1518959
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse