Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Nov 10, 2015 4:33:37 AM
Nov 10, 2015 4:33:37 AM
We suggest that you do the How to Make Reports Selectable with NPrinting On-Demand tutorial before doing this tutorial.
This tutorial explains how to use Section Access combined with NPrinting On-Demand in order to get or send reports on demand that are filtered according to the Section Access connected user.
NPrinting does not support NT Security to authenticate Section Access users. You cannot specify NTNAME, NTDOMAINSID or NTSID in the loading script. If your QlikView document uses NT Security, you need to create a QlikView user with administrative rights that can access all data. You then need to create a recipient for each user and apply related filters. Please note that you can import recipients with filter definitions from external files, databases or QlikView charts. In the following example we use the Load * INLINE method to obtain a clear explanation, however, you can load the section access users with the method you prefer.
The first part of the tutorial explains how to preview a report filtered for a Section Access user. The second part will explain how to send a report to the connected Section Access user.
Attention: remember to save QlikView documents used as NPrinting connections with WebView mode deactivated. NPrinting cannot open QlikView documents with WebView mode activated because it doesn't have full control of QlikView functionalities.
Make a copy of SalesDemo for Ajax.qvw in C:\NPrintingTraining\QlikViewDocuments\ and call it SalesDemo for Ajax - Section Access.qvw
4. Save the script and reload (ctrl+r).
This will create the new Section Access users and connect Elvis and Helen to respective salesman in the .qvw so when Elvis will connect into the QlikView doc he will see only his data
5. Exit QlikView
SalesDemo for Ajax.qvw - Section Access in C:\NPrintingTraining\QlikViewDocuments\ contains the NPrinting Report Extension button called PowerPoint Report with Multiple Pages - Current Selections and the others. Do the tutorial, How to Use NPrinting Extensions in Qlikview Documents, to learn more on how to create it. Let's embed a new text box to display the user who is currently logged in.
Right click on an empty part of the sheet, select New sheet object from the menu that appears, then drag and drop a new Text Object onto the sheet.
Now Save the QlikView document and exit QlikView. Reopen SalesDemo for Ajax - Section Access.qvw in C:\NPrintingTraining\QlikViewDocuments\
Enter Elvis in both the User ID and the Password fields clicking on the OK button each time.
When the report is ready, open it. The first slide displays the selections applied at the moment of creation. Year: 2013 from your current selection and Salesman: Elvis Presley from Section Access, as expected. Both filters were applied.
Create an NPrinting recipient named ELVIS (all caps). It is easiest just to clone recipient Elvis Presley and change the Name to obtain the new Section Access user.
See this tutorial about recipients: How to Create and Import Recipients with Filters and Distribution Groups
Remember to customize the email address if you are using the NPrinting training environment.
Create Task Send Top 25 Products with Current Selection in the NPrinting project
(see: link tutorial task on demand)
Add Excel Report Top 25 Products to the task. This is a very simple Excel report, easy to create. See: How to Create Excel Reports
It is mandatory to insert a recipient, No email, here with an email address, otherwise NPrinting won’t let you activate email report. You can insert an email address that nobody will read or an address like a@b.c.
Add an NPrinting task extension that runs Task Send Top 25 Products with Current Selections.
Right click on the new button and select Properties. Select Button appearance and configure the following fields as indicated:
Click on On-Demand service connection and configure the following fields as indicated:
Click on Task settings and configure the following fields as indicated:
Click on Filter settings and configure as indicated:
Close the object Properties editor, then save the QVW and close it.
Click on the run task button entitled: Task Send Top 25 Products with Current Selections.
Go to the e-mail account you put in the ELVIS recipient and look for a message for ELVIS.
Download and open the report for ELVIS. Note the heading.
Now add a a selection, Year=2013 for instance and run the task again. You’ll find a report in the associated e-mail account box containing data filtered by Salesman=Elvis Presley (as before) and by Year=2013.
Close the report and the QlikView document in QlikView.
Open the document with User ID: Helen and Password: Helen
Click on the run task button entitled: Task Send Top 25 Products with Current Selections.
There is no NPrinting recipient associated with Helen.