Security Filter Roles for Reports

For those of you who read my last post I have now managed to create a number of (Simple) reports in the Report Writer. Thanks for the opinions[:D]. Of course now I have a question which I hope someone can answer. I created a Sales Analysis report detailing the sales figures for a Sales period grouped by Item and Sales Person (we have a bespoke Sales Analysis table). But I want to restrict the Salesperson so they can only see their own Sales. I created a Role with an Object Type of table but this still allows the user to select all SalesPersons code on the report. And when I try to create a role with a Object Type of report there is no Security Filter facility [V]. How can I get around this problem and restrict each user so he can only see this own sales.[?]

Hi Brian A little work with filtergroups and the userid’s in the OnInitReport-trigger should help.

Yes, I would agree with Hans-Dieter. We have used a similar technique: Put the users Salesman Code onto the User Setup table as a new field. OnInitReport trigger: UserSetup.GET(USERID); FILTERGROUP(2); SETRANGE(SalesmanCode, UserSetup.UsersSalesmanCode); FILTERGROUP(0); This works because, in the User Request for the report, the user can only set filters in group 0, and filters in higher groups (like 2) are applied to the data before the users filters. Andy

I am trying something similar but it is not working:

Report - OnInitReport()
Customer.FILTERGROUP(2);
Customer.SETRANGE(“Rebate Customer Type”, Customer.“Rebate Customer Type”::Rebate);
Customer.FILTERGROUP(0);

I have a single dataitem of Customer and I need the No. field restricted to specific records.

Any help appreciated please.

Looks like you’re on the right track, you just need to filter on the No. field instead of or in addition to the Rebate Customer Type. Or maybe I missed something?

Saw your other post. See the response here: http://www.mibuso.com/forum/viewtopic.php?f=23&t=43469&p=213162#p213162