Discussion Board for collaboration on QlikView Scripting.
I am trying to use Section Access based on leased license.
I need to restrict sheets based on the license leased by that user.
Any idea how this can be achieved?
If you have a SBE license (up to 25 User CALs and up to 100 Document CALs), then the user logging on to the system is the same that the user's.
So for example, DOMAIN\USER1 has a license to open your document, then use NTNAME field instead of USERID and PASSWORD in your Section Access:
SectionAccess:LOAD * INLINE [ACCESS, NTNAME, REDUCTIONADMIN, DOMAIN\ADMINISTRATORUSER, DOMAIN\USER1USER, DOMAIN\USER2];
Or something like that with your own Active Directory users and REDUCTION field (should you use any).
Hope that helps.
I've tried this approach based on NTNAME and it works fine. But in this case, I need to put the domain\username in the inline table or may be some part of table e.g. XLS or DB Table.
Can I do something like licenses 1 to 5 for this user_role, licenses 6-10 for this particular user_role.
thanks in advance for your help.
NTNAME supports Active Directory groups so having that DOMAIN\Sales has users DOMAIN\User1 and DOMAIN\User2,
SectionAccess: // Using inline, xls, database will work fine tooLOAD * INLINE [ ACCESS, NTNAME, REDUCTIONADMIN, DOMAIN\ADMINISTRATORSUSER, DOMAIN\SALES, SALESUSER, DOMAIN\HR, HR];
should work as well for both users.
As mentioned in the comment line, the source for a section access may be any of the allowed sources in QlikView (files, websites, xls, databases), but note that should you load them from a QVD file, you need to unoptimize the load:
SectionAccess: // Using inline, xls, database will work fine tooLOAD ACCESS, NTNAME, REDUCTIONFROM SA.QVD (qvd) WHERE 1=1; // This WHERE clause makes the load unoptimized
Hope that helps
I am trying following code for section access.
LOAD * INLINE [
ACCESS, USERID, PASSWORD, GROUPNAME
I've controlled the sheets to be displayed based on the GROUPNAME.
When I try this on local machine, everything works fine.
But when I am trying to put this on Publisher, I need to give userid/password credentials under the reload section.
When the document is published and I am trying to access it from my local machine via "Open In Server", the document asks for userid/password.
Now it only accepts the useid/password I've given under the reload section. It is not accepting any other password. Any idea if I am missing on some configurations?
Regardless the users that can access to the document, in Publisher you need to add to section access the Active Directory user the services are running under with ADMIN access and leaving the "GROUPNAME" field empty for that user (that means "all values").
But if you are publishing those documents, do you still need section access? Publisher is already reloading the documents for the users with its information.
Apart from that, further documentation on Publisher and Section Access is available in the Server Reference Manual that you can find in the Downloads section within the Support menu at the top of this page.
Hope this helps.
Thanks for the help.Now, I am able to work with section access based on NTNAME with publisher.
I've one more question:
1. Can I control(Enable/Disable) section access feature through a flag in external text file?
I am able to achieve it with following two changes.
A) Disable the section access flag in the text file.
B) Go to qvw -> Document Properties -> Opening -> Uncheck Initial data reduction flag.
I want to know, if the part B can be done through a script or a macro so that I need not open the qvw in deployment environment.
suyash2005 wrote:1. Can I control(Enable/Disable) section access feature through a flag in external text file?
Note that you need in all cases to reload the document in order to remove the section access from memory.
suyash2005 wrote:B) Go to qvw -> Document Properties -> Opening -> Uncheck Initial data reduction flag.
Actually there are some macros to do that (in the macro editor):
Sub SecOn Set dp = ActiveDocument.GetProperties dp.DynamicReduceData = true dp.ProhibitBinaryLoad = true dp.StrictDynamicReduction = true ActiveDocument.SetProperties dpEnd Sub Sub SecOff Set dp = ActiveDocument.GetProperties dp.DynamicReduceData = false dp.ProhibitBinaryLoad = false dp.StrictDynamicReduction = false ActiveDocument.SetProperties dpEnd Sub
Hope this helps.