Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi Shlomo,
I have found with Section Access that you often have to add rows to the section access that include all permutations attached to a dummy user so that the * works for other users. Also I have found that nulls can be problematic - so you probably want to replace missing dealers and reps with the text 'No Dealer' and 'No Rep' and add these values into your Section Access.
Hope that helps.
Regards,
Steve
hi, thanks for your answer
shlomo