2 Replies Latest reply: Nov 17, 2010 9:52 AM by Korin Geri RSS

    Conceptual problem with Access Restriction

    Korin Geri

      Hi all,

      i have a qlikview report of sales. the module is based on a full outher join of the following objects:

      sales documents; sales lines; items;dealers,reps and so on.

      now i need to create 3 types of users:

      super user - can see all of the sales data

      dealer - can see all of the invoices issued for this dealer

      rep - can see all of the invoices belongs to shipping sites under this rep

      now, there are invoices without a "dealer" or without a "rep".

      this is my code:

       

      star is *;

      Section Access;

      LOAD * INLINE [

      ACCESS,USERID,PASSWORD,DEALERCODE,U_REP

      ADMIN,ADMIN,1,*,*

      ];

      SELECT 'USER' ACCESS,CardCode USERID,-99999 PASSWORD,CardCode DEALERCODE,'*' U_REP FROM OCRD GROUP BY CardCode;

      SELECT 'USER' ACCESS,REPLACE(U_Rep,' ','') USERID,-99999 PASSWORD,'*' DEALERCODE, U_REP FROM CRD1 WHERE AdresType='S' GROUP BY U_Rep;

      Section Application;

       

       

      now, because the star means - data of all other users, if i logged in with a dealer who has an invoice without a rep, thie invoice would not be shown.

      i'll be happy for any idea

      thanks,

      Shlomo