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
Author
Message
Posted Wednesday, November 27, 2013 8:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, December 1, 2014 12:34 PM
Points: 23, Visits: 106
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
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 11:18 AM
Points: 364, Visits: 902
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 ---
SELECT
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!

Cheers,
EJM
Post #1518959
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse