Can I use Section Access with NPrinting?

    This tutorial illustrates how to create NPrinting reports from QlikView documents created with Section Access. Please refer to the official QlikView documentation which explains QlikView Section Access in detail very well.

    The file C:\NPrintingTraining\QlikViewDocuments\SalesDemoSectionAccess.qvw contains this script at the beginning:

    SECTION ACCESS;

    LOAD * INLINE [

    ACCESS, USERID, PASSWORD, MAN ADMIN, ADMIN, ADMIN, *

    USER, Elvis, Elvis, 2 USER, Helen, Helen, 9 ];

     

    SECTION APPLICATION;

    SALES:

    LOAD * INLINE [

    MAN, EmployeeID

    2, 2

    9, 9 ];

    which creates section access with an admin and two users. Each user can see only his data because of the filter on EmployeeID.

    The users and passwords are:

    admin admin

    Elvis Elvis

    Helen Helen

    N.B. NPrinting is not compatible with NT security in regards to recipients and associated filters, as things stand now.

    QlikView NT security is based on Windows authentication, so it is not directly managed by QlikView. NT security  checks the UserName of the user that is logged on the windows machine. This cannot be managed by NPrinting because the service does not log into the Window machine as a new user, so NT security access cannot be guaranteed to the NPrinting service.

    It is necessary to remove NT security from the documents that is used by the NPrinting service to create reports.

    If it's not possible we suggest you to create a copy of the QlikView document and save it on a protected folder.

    Configure Document Properties

    Configure-Document-Properties.png
    • Open QlikView Document Properties window (Ctrl + Alt + D) or Settings -> Document Properties
    • Select the Opening tab
    • Put a check mark in both the Initial Data Reduction Based on Section Access and the Strict Exclusion boxes

    Open NPrinting File in NPrinting

    Open-NPrinting-File-in-NPrinting.png

    Click on the Open icon on the File tab and browse to C:\NPrintingTraining\NPrintingFiles\NPrintingTraining.nsq and open it or if C:\NPrintingTraining\NPrintingFiles\NPrintingTraining.nsq is already listed under Recent Files, click directly on it.

    Create New Connection

    Create-New-Connection.png
    1. Enter Sales Demo Section Access as the Name of the Connection
    2. Enter a Description (optional)
    3. Click on the browse button at the extreme right of the QlikView document field

    Select QlikView Document

    Select-QlikView-Document.png

    Browse to C:\NPrintingTraining\QlikViewDocuments\ and:

    1. Select SalesDemoSectionAccess.qvw
    2. Click on the Open button

    Configure Last Parameters

    Configure-Last-Parameters.png
    1. Enter "admin" both as User name and Password
    2. Make sure there is no check mark in the Clear all selections box
    3. Click on the Save and Close icon

    Create New Recipient

    Create-New-Recipient.png
    1. Enter Elvis Presley Section Access for the RecipientName
    2. Enter C:\NPrintingTraining\PersonalFolders\ElvisPresley as the Folder name
    3. Enter ElvisPresley for the SubFolder name

    Configure Security

    Configure-Security.png
    1. Put a check mark in the Enable Security box
    2. Enter "Elvis" as both the User ID and Password
    3. Click on the Save and Close icon in the Actions group of the tool bar

    Configure Helen Brolin Recipient

    Configure-Helen-Brolin-Recipient.png
    1. Enter Helen Brolin Section Access for the RecipientName
    2. Enter C:\NPrintingTraining\PersonalFolders\HelenBrolin as the Folder name
    3. Enter HelenBrolin for the SubFolder name

    Configure Helen Brolin Security

    Configure-Helen-Brolin-Security.png
    1. Put a check mark in the Enable Security box
    2. Enter "Helen" as both the User ID and Password
    3. Click on the Save and Close icon in the Actions group of the tool bar

    Configure New Excel Report

    Configure-New-Excel-Report.png
    1. Enter Section Access as the report Name
    2. Enter a Description (optional)
    3. Check the Enable Dynamic Naming box

    Enable Dynamic Naming

    Enable-Dynamic-Naming.png

    Though this step is optional, it provides for more distinct, understandable file names

    1. Put a check mark in the Enable Dynamic Naming box
    2. Make sure that Report name is selected for the first Item that is present
    3. Add a second Item by clicking on the green '+' at the far right of the Item fields and set it to Recipient name
    4. Click on the New icon in the Template group to open the Template Editor

    Create Template

    Create-Template.png
    1. Add the QlikView object CH184 to the table node
    2. Drag and drop it in the cell B4
    3. Add Salesman field as level
    4. Drag the Salesman_Level node token to A1 and the end tag to A6
    5. Drag the tag with the field value <Salesman> to A2
    6. Format it as 14px, Bold

    Click on the Save As icon to conclude template development.

    Save Template and Report

    Save-Template-and-Report.png
    1. Enter Section Access template.xlsx for the File name
    2. Click on the Save button
    3. Click on the Save and Close icon in the Report Editor window to save the report

    Configure New Report Task

    Configure-New-Report-Task.png
    1. Create a new Report Task named Section Access
    2. Set the Connection to Sales Demo Section Access
    3. Set Use to Task output folder
    4. Output folder to C:\NPrintingTraining\Output

    Add Report to Task

    Add-Report-to-Task.png
    1. Select Reports in the Show group
    2. Click on Add in the Reports group
    3. Add the Section Access report

    Add Recipients to Task

    Add-Recipients-to-Task.png
    1. Select the Recipients icon in the Show group
    2. Click on the Add icon in the Recipients group
    3. Select and add Elvis and Helen to the Task
    4. Click on the Save and Close icon

    Run Task

    Run-Task.png

    Select the Section Access task in the list and click on the Run icon.

    Inspect Log

    Inspect-Log.png

    Please note the start of QlikView security with the Helen user, the start of Section Access, and the end of Section Access.

    Inspect Elvis Presley Report

    Inspect-Elvis-Presley-Report.png

    Inspect Helen Brolin Report

    Inspect-Helen-Brolin-Report.png

    The two reports contain only the data pertinent to the recipient.