SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Report Model Security


Report Model Security

Author
Message
myjobsinus
myjobsinus
Valued Member
Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)

Group: General Forum Members
Points: 64 Visits: 140
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.
eric.muller
eric.muller
SSChasing Mays
SSChasing Mays (631 reputation)SSChasing Mays (631 reputation)SSChasing Mays (631 reputation)SSChasing Mays (631 reputation)SSChasing Mays (631 reputation)SSChasing Mays (631 reputation)SSChasing Mays (631 reputation)SSChasing Mays (631 reputation)

Group: General Forum Members
Points: 631 Visits: 1343
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search