Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Does admin(user) rights is required in document with section access

Hi All,

I don't have the admin user in my section access part. As per the document it says that admin user have the authority to restrict edit script,reload,save,etc options for the non admin user. But i admin user is not there in my document. Is there is any way to reduce restrict the user from accessing edit script,reload,save,etc options. Is it must that all the document with section access must have the admin user to restrict the non admin user? As currently we don't want the admin rights in our document.

Also let me know is it necessary that user name should only be 'admin' for the admin user. Can't it be with different name. Something like vadmin or administrator???

Hope some one will let me know the best possible way.

116 Replies
Not applicable
Author

Yes, this is what I did as the 1st Step from your original file.

Not applicable
Author

Hi Sajeevan!

You mean to say that i need to add like this???


CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=mercury;Initial Catalog=VPDPL-1;Data Source=GL28;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GL28;Use Encryption for Data=False;Tag with column collation when possible=False];

items:
SQL select i.c_account_code as account,i.c_item_code as itemcode,c_pack as pack,
i.c_mfac_code as mfaccode,rtrim(i.c_name)+' '+rtrim(i.c_pack) as itemname,
rtrim(i.c_account_code)+rtrim(i.c_mfac_code) as userid,rtrim(m.c_password) as password,
//rtrim(i.c_account_code)+rtrim(m.c_loginid) as userid,rtrim(m.c_password) as password,
i.n_mrp as MRP,i.n_newflag as recentitem,i.c_Scheme as schemes,m.c_name as mfacname,
c.c_name as contentname,c.c_note as contentname1
from item_mst i inner join mfac_mst m on i.c_mfac_code=m.c_mfac_code
left outer join content_mst c on i.c_content_code=c.c_content_code;
//where left(i.c_name,1)<>'~' and left(m.c_name,1)<>'~';

CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=mercury;Initial Catalog=VPDPL-1;Data Source=GL28;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GL28;Use Encryption for Data=False;Tag with column collation when possible=False];

sales:
SQL select stk_sales.c_ac_code as account,
d_date as Date,Year(d_date) as Year,Month(d_date) as Month,stk_sales.c_item_code as itemcode,
n_purqty as PurQty,n_pur_Sch_qty as PurSch,n_purvalue as PurValue,
n_salqty as SalQty,n_sal_sch_qty as SalSch,n_salvalue as SalValue,
n_crqty as RtnQty,n_cr_sch_qty as RtnSch,n_crvalue as RtnValue,
n_clqty as StkQty,n_clvalue as StkValue from stk_sales,item_mst, mfac_mst
where stk_sales.c_item_code=item_mst.c_item_code and item_mst.c_mfac_code=mfac_mst.c_mfac_code;
//and left(item_mst.c_name,1)<>'~' and left(mfac_mst.c_name,1)<>'~';

ItemsData:
load account as ACCOUNT, account&itemcode as account_itemcode, pack,
mfaccode as MFACCODE, itemname, userid as Item_userid, password as Item_Password,
MRP, recentitem, schemes, mfacname, contentname, contentname1 resident items;

SalesData:
load account&itemcode as account_itemcode, Month, Year, Date,
PurQty, PurSch, PurValue, SalQty, SalSch, SalValue, RtnQty, RtnSch, RtnValue,
StkQty, StkValue resident sales;

drop table sales;
drop table items;

Store * from ItemsData into C:\Sajeevan\QlikView\2010\items.qvd;
Store * from SalesData into C:\Sajeevan\QlikView\2010\sales.qvd;





Not applicable
Author

Hi Rikab,

You just need to rename some of the variables as I did in your SQL select itself.

I am attaching another example how this to be done.

Please use the usernames and passwords below and see how the data gets reduced. For some reason I am not able to solve your issue. We are closed on Friday and Saturday for our weekends.

ADMIN, Rikab, Rikab2010
USER, U0010012021, c2info99
USER, Saji, Saji2010

Admin user Rikab will get access to everything and rest will access to a reduced data set only.

Hope you can learn from the attachments.

In your database you may have to change the Section Access like below to load the data from resident table

[script]

DummyData:
load distinct Item_userid, Item_Password, ACCOUNT, MFACCODE resident items;

Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, UACCOUNT, UMFACCODE
ADMIN,Rikab, Rikab2010,ALL,ALL
];
concatenate
LOAD
'USER' as ACCESS, Item_userid as USERID, upper(Item_Password) as PASSWORD,
ACCOUNT as UACCOUNT, MFACCODE as UMFACCODE
resident DummyData;

Section Application;
star is *;

LOAD * INLINE [
UACCOUNT, ACCOUNT
ALL, *
];
concatenate
LOAD distinct ACCOUNT as UACCOUNT, ACCOUNT resident DummyData;

LOAD * INLINE [
UMFACCODE, MFACCODE
ALL, *
];
concatenate
LOAD distinct MFACCODE as UMFACCODE, MFACCODE resident DummyData;

drop table DummyData;

[/script]

Thanks,

Sajeevan

Not applicable
Author

Hi Sulistiyo

Sorry for the news! Don't worry everything will be alright. Thanks for the example. It is very simple doesn't suit as per my requirement. Check whether you work on my document itself.

Thanks and Regards,

Rikab

Not applicable
Author

Hi Sajeevan!

Lots of confusion while working around. Don't know which one has to be renamed and where items and sales data need to be added. Anyway will work around and will check whether it works or not.

Have a great weekend!

Thanks and Regards,

Rikab

Not applicable
Author

Hi Sajeevan!

Nothing seems to be working me. May be the order in which the script is there is not proper. I am confused because some script is there in the forum and some in the document and few are there in the qvd which you loaded into qlikview.

Hope after your weekend when you come back we can work on it and finish it off if you have time. Because it is simply going too long and feeling bad that i am consuming your time also.

Let me know whats wrong in the order of my script if you come to know.


CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=mercury;Initial Catalog=VPDPL-1;Data Source=GL28;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GL28;Use Encryption for Data=False;Tag with column collation when possible=False];

items:
SQL select i.c_account_code as account,i.c_item_code as itemcode,c_pack as pack,
i.c_mfac_code as mfaccode,rtrim(i.c_name)+' '+rtrim(i.c_pack) as itemname,
rtrim(i.c_account_code)+rtrim(i.c_mfac_code) as userid,rtrim(m.c_password) as password,
//rtrim(i.c_account_code)+rtrim(m.c_loginid) as userid,rtrim(m.c_password) as password,
i.n_mrp as MRP,i.n_newflag as recentitem,i.c_Scheme as schemes,m.c_name as mfacname,
c.c_name as contentname,c.c_note as contentname1
from item_mst i inner join mfac_mst m on i.c_mfac_code=m.c_mfac_code
left outer join content_mst c on i.c_content_code=c.c_content_code;
//where left(i.c_name,1)<>'~' and left(m.c_name,1)<>'~';

CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=mercury;Initial Catalog=VPDPL-1;Data Source=GL28;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GL28;Use Encryption for Data=False;Tag with column collation when possible=False];

sales:
SQL select stk_sales.c_ac_code as account,
d_date as Date,Year(d_date) as Year,Month(d_date) as Month,stk_sales.c_item_code as itemcode,
n_purqty as PurQty,n_pur_Sch_qty as PurSch,n_purvalue as PurValue,
n_salqty as SalQty,n_sal_sch_qty as SalSch,n_salvalue as SalValue,
n_crqty as RtnQty,n_cr_sch_qty as RtnSch,n_crvalue as RtnValue,
n_clqty as StkQty,n_clvalue as StkValue from stk_sales,item_mst, mfac_mst
where stk_sales.c_item_code=item_mst.c_item_code and item_mst.c_mfac_code=mfac_mst.c_mfac_code;
//and left(item_mst.c_name,1)<>'~' and left(mfac_mst.c_name,1)<>'~';

ItemsData:
load account as ACCOUNT, account&itemcode as account_itemcode, pack,
mfaccode as MFACCODE, itemname, userid as Item_userid, password as Item_Password,
MRP, recentitem, schemes, mfacname, contentname, contentname1 resident items;

SalesData:
load account&itemcode as account_itemcode, Month, Year, Date,
PurQty, PurSch, PurValue, SalQty, SalSch, SalValue, RtnQty, RtnSch, RtnValue,
StkQty, StkValue resident sales;

drop table sales;
drop table items;

Store * from ItemsData into E:\QlikView\Application\SASLogin\DATA\items.qvd;
Store * from SalesData into E:\QlikView\Application\SASLogin\DATA\sales.qvd;

DummyData:
load distinct Item_userid, Item_Password, ACCOUNT, MFACCODE resident items;

Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, UACCOUNT, UMFACCODE
ADMIN,Rikab, Rikab2010,ALL,ALL
];
concatenate
LOAD
'USER' as ACCESS, Item_userid as USERID, upper(Item_Password) as PASSWORD,
ACCOUNT as UACCOUNT, MFACCODE as UMFACCODE
resident DummyData;

Section Application;
star is *;

LOAD * INLINE [
UACCOUNT, ACCOUNT
ALL, *
];
concatenate
LOAD distinct ACCOUNT as UACCOUNT, ACCOUNT resident DummyData;

LOAD * INLINE [
UMFACCODE, MFACCODE
ALL, *
];
concatenate
LOAD distinct MFACCODE as UMFACCODE, MFACCODE resident DummyData;

drop table DummyData;


Thanks and Regards,

Rikab

Not applicable
Author

Hi Sanjeevan!

I am looking for your reply! Also Some interesting learning is happening here and i wish that you see this post. Also add your idea into it!

Thanks and Regards,

Rikab

Not applicable
Author

Hi Rikab,

I didn't get any time to look in to this. I am currently busy with many activities in the office. Can you let me know what error are you getting?

Thanks,

Sajeevan

Not applicable
Author

Hi Rikab,

I quickly checked it again and seems everything working fine. It is able to login with "rikab" as the admin username with admin password as "Rikab2010" as well as "0010012021" as the username and "C2INFO99" as the password for USER access.

Find attached my solution and check whether you need to do similar changes if any in your script.

1. Database2_step1 will require the username as "0010012021" and password as "c2info99" while opening.

2. Database2_Final will require "rikab" as the username and "rikab2010" as the password while opening.

Let me know what is not working for you. I assume that you do not want the user to edit the script - for this you need to have all your script in a hidden script.

Please let me know the outcome.

Thanks,

Sajeevan

Not applicable
Author

Hello Sanjeevan!

I don't know how to explain my doubt. As i need to learn your logic first. By the way what is running on my mind i will put it here. Hope you will understand where i am struggling.

What i wanted to ask is do we need to create a seperate document just to load the data and then calling the tables which has been created using this document and then again creating the final document and then loading the binary data. Can't we do everything in to one for east maintanence?

Have you seen in post which i have sent it to you. In that he has concatenated the common column to avoid the synthetic and then many more things has been done there. Can't do any changes in that to get the final working copy.

I am checking both the copy. I will check which one can give the final solution and which one the maintanence will be easier.

Thanks and Regards,

Rikab