Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This forum is where any logged-in member can create a knowledge article.
This video series is designed to introduce you the Qlik NPrinting PixelPerfect report editor.
You can download this tutorial version also in PDF. The PDF contains all the formulas that are used in these tutorials.
When importing Qlik NPrinting users from an Excel file, it is possible also to create filters that made selections on more than one field.
Be sure to know the content of https://help.qlik.com/en-US/nprinting/May2022/Content/NPrinting/DeployingQVNprinting/Import-Users-Filters.htm#anchor-2 before proceedeing.
This article is valid for all Qlik NPrinting versions that supports users import via Excel file.
The sample file is attached.
In the Filters worksheet of the source Excel file create a row like the following:
In the column Values there are selections based on two fields: [Country]={Austria, Belgium},[CategoryName]={Babywear, Sportswear}. As you can see you have to simply separate the selections on each field by a comma.
In the column Numeric values there is the selection [Year]={2019} that also will be part of the created filter.
Create an Import Task as usual and run it. The result will be a new filter like:
It includes all the selections based on different fields we inserted in the Excel file and:
they have the correct setting in the drop-down menu.
The NPrinting Audit Trail application is a Qlik Sense application that is intended to be run in Qlik Cloud, Qlik Sense Enterprise Client-Managed, or Qlik Sense Desktop. This application summarizes and profiles the audited report execution activity of one or more NPrinting sites. It provides a view of the quantity of reports produced that is drillable by format, destination and other dimensions.
The application can help quantify dependencies prior to moving to Qlik Cloud and can also serve as a snapshot of raw reporting volume that exists on a production system.
Please see the attached configuration guide for setup instructions in your own Qlik Sense environment.
Note: If you only use NPrinting with QlikView, you can still use this application provided you have access to a Qlik Sense environment.
SHEETS:
Requirements
Starting with 15.2, it's possible to import filters specifying the ConnectionName and isNumeric and Evaluate parameters. With 15.3.0.1, you can also import a field that seems numeric as text. This tutorial explains this new syntax.
Read "Filter Syntax, Parameters, and Options for Importing Recipients" prior.
From NPrinting 15.2 and forward, you may use the following syntax:
[connectionName].[field] = {value1<isnumeric,evaluate>,value2<isnumeric,evaluate>,...}<drop,unlock,lock,verify,excluded>
The old syntax still works. If you use the old syntax you don't need to specify the name of the connection, isNumeric and Evaluate parameters.
The other fields aren't mandatory.
If you don't specify the connection name, it will refer to the default connection. Entering this line of code, the Year field is set to two values:
Verify filter option is activated.
In the first part of this line of code the name of the connection of the Field is specified. By specifying this you can create different filters based on Fields from different connections.
In this case two Fields from two different connections are specified. With this new syntax it is possible to create filters based on fields from different connections.
After importing the Recipients, you'll find a new filter with two fields from two different connection.
Starting with 15.3, it's possible to explicitly set or unset a flag for the isNumeric and Evaluate parameters. Previous syntax will still work.
[connectionName].[field]={value1<isNumeric=yes,Evaluate=no>, value2<isNumeric=True,Evaluate=True>}
You can use "Yes" or "No" or the boolean values "True" or "False".
In the first part, the IsNumeric flag is explicitly set to Yes and Evaluate to No. In the second part the IsNumeric and Evaluate flags are both forced to True, which is synonymous with Yes. This means that the expression will be evaluated and return a numeric value.
The QlikView field CustomerIDText is created as a text field but it contains values that seem to be numbers. By inserting "IsNumeric=no" we are sure that the flag will be disabled and the value "0063" will be compared as a string.
You can import filter values that contain commas (,) by enclosing them between double quotes ("). Using a comma outside will continue to be the separator between two value.
You can import filter values that contain formulas with commas (,) by inserting them between double quotes(").
To import new Recipients refer to "How to Create and Import Recipients with Filters and Distribution Groups".
From NPrinting June 2019
Note: I have made a few changes to a copy of the sample Qlik Sense App found here and used that as the Connection source for these examples. The modified App and exported report are attached to this post.
Fields that exist in the source document that we use:
Variables that exist in the source document that we use:
Example 1.
Filtering for a date range.
With Advanced search filters you can filter for a date range in any of these ways:
Note: The above filters were defined on the Date field. You can also define the same filters for other fields just as you can use expression search in the source document if you want to search for values in associated fields. For example you could use the exact same filter definition for the Customer field to get different results:
Screenshots of the Filter editor showing the difference:
Example 2.
Filtering for the Top n
Here is an example using Advanced search filters and Aggr() to filter for the Top 10 Customers (most Sales). You can of course use a variable or an expression that results in an integer instead of hard-coding the number 10.
=Customer=aggr(if(rank(sum(Sales)) <=10, Customer), Customer)
Example 3.
Filtering for a range
Similar to example 1. Here again you can use variables or expressions instead of hard-coding the numbers.
=sum(Sales)>=300000 and sum(Sales)<=500000
Example using aggr() to get Customers with Sales above average but also less than or equal to $160,000
=sum(Sales)>Avg(TOTAL Aggr(Sum(Sales),Customer)) and sum(Sales)<=160000
Example 4.
Filtering using wildcards
Advance search filters supports the use of wildcards. This example filters for all Customer names that begin with IB or end with EX
=Customer like 'IB*' or Customer like '*EX'
I'm very excited to see the myriad ways this powerful feature will be used going forward. I hope this short introduction gets you started.
- Daniel.
To set up the example project:
The attached Migration Playbook is intended to be a consolidation of references for those who are on a QlikView NPrinting 16 to Qlik NPrinting 19 migration journey. It includes migration content from Qlik Community Posts, Qlik YouTube Channels, Qlik Support articles, Qlik Help site references, and guidance from the Qlik NPrinting product team. Read it from front to back or just selectively review the sections that relate to you - I hope you find this useful!
Reminder - this is relevant to QlikView NPrinting 16 customers only. If you are on Qlik NPrinting 17+ this guide is not for you.
For a wider view of additional and important migration considerations 'before' you migrate, please visit:
Updated April 28, 2020: change log in V2 document attached.
So, how to send KPI results to a user by SMS rather than email so you can get a result like the one below. This could be used for daily or hourly status messages to Senior Execs, for operation direction to the salesforce or the distribution team, or for conditional based alerting when KPI results meet a certain criteria. There are so many use cases here... I've also added an example in Arabic (google translate version) to show right to left language capability in the SMS.
It's actually reasonably simple but you do require a 3rd party SMS gateway to perform the translation of an email to an SMS. All telco operators offer these services, and a number of other web based operators too, and all work in much the same way as the example here.
Step 1 - Setup your SMS Gateway provider account
I have used TextMagic for this example as it's easy to work with and offers a free trial with some minimal credit for testing.
Other services that will work in a similar way (and may be cheaper)
SMS Country - Send your email via SMS- Email to SMS- SMS Country
SMS Global - Email To SMS | SMS To Email | Email Text Messages | SMS from Outlook
Text Anywhere - TextEmail – Send SMS Text Messages from any Email system and Microsoft OMS – TextAnywhere.net
Esendex - Email to SMS - Send and receive SMS via email - Esendex
Step 2 - Setup your NPrinting instance with the user to receive the SMS
Your SMS gateway provider will indicate the email format for the mobile number you wish to send the SMS to. For example, with TextMagic the format is 4470851234567@textmagic.com for the telephone number +44 7085 1234567 (a clearly made up number).
This is the email address to assign to the user in NPrinting. Note: It is likely that you will have 2 NPrinting user accounts for a single individual if they receive SMS alerts and other reports from NPrinting (hub, newstand, email attachments etc).
Step 3 - Create your HTML report (or import the one attached along with the example application)
The HTML report is very simple. It looks like this in the NPrinting Designer Editor window and is looking at Gauge objects as tables.
Step 4 - Setup your Publish Task
Go through the normal setup process.
Step 5 - run the publish task and receive the SMS
It's pretty easy eh!
Troubleshooting:
The names you give your reports can be crucial for aiding people to access the right information quickly. Control the names assigned to your reports with NPrinting by creating static elements in report names as well as inserting arbitrary text, variable elements like cycle field values, and the values of QlikView variables. This tutorial explains how to use the NPrinting dynamic report naming feature.
Click on the green '+' sign to add another element to the names of your reports. Add more that one if need be.
Select the element you want to use from the drop down menu; the following elements are available:
Open the drop-down menu and select a format.
Select a Separator to divide the elements of the report name, the underscore is the default.
The report name is displayed in the Preview field at the bottom of the Output File area; variable values are represented by the name of the variable. Note the Custom text field added here in place of the Date field.
When creating templates for generating reports, you will sometimes want to present information with the formatting as it is in QlikView. This is the default setting. Other times you will want to apply formatting that Excel provides the tools to apply as you create templates in Excel. Table and column formatting using tools provided by Excel works only if you save your template in .xslx format and not if your template is saved in .xls format. Save Excel templates in .xls only if necessary for backward compatibility.
After you have added a QlikView object as a table:
This will cause the content for all cells in all columns of the table to be exported from QlikView without formatting and the application of formatting from the Excel tool ribbon that you set in the template.
If you want to keep source formatting for the majority of columns, leave the Keep Source Formats box checked for the table as a whole and proceed as follows:
This will cause the content for all cells in the selected column of the table to be exported from QlikView without formatting and you can apply formatting from the Excel tool ribbon. You can do this for as many individual columns as you need.
Users should be aware that the NPrinting 17.x repository may be removed in case of a failed upgrade: Upgrading NPrinting? Read this. Taking regular backups of your files & data is always a good idea anyway and backing up your NPrinting Repository should be no different. Here is a batch file that you could run using your Windows Task Scheduler to automate Qlik NPrinting Repository backups.
Features:
To change manually:
Disclaimer:
HTH - Daniel.
To execute this tutorial you must have QlikView Server and Publisher installed and running. You need also NPrinting Server. Of course, you need related licenses.
In this tutorial you'll learn how to schedule the reload of a .qvw in QlikView Server and then distribute reports based on it by using NPrinting only if the reload finished successfully.
This is an advanced tutorial that requires a good knowledge about developing solutions using NPrinting. We'll use examples from the NPrinting Training environment.
In the "Distribute" tab set C:\ProgramData\QlikTech\Documents as distribute folder and select "All Authenticated Users" in the drop-down menu. Use this document in the source connection of the NPrinting project.
It's very important that you know the tutorial "How to Execute NPrinting Reports by External XML" Request very well.
In the folder C:\NPrintingTraining\ExternalRequestsXML create the text file QVS.processed. The code to insert is:
<?xml version="1.0"?>
<schedules>
<schedule file="C:\NPrintingTraining\NPrintingFiles\NPrintingTraining.nsq" type="job" entityName="Send a Report via Email" />
</schedules>
This will run the job "Send a Report via Email" that must be present in the .nsq file. To create a job refer to "How to Create Jobs"
In the folder C:\NPrintingTraining\ExternalRequestsXML create the file QVS.bat with the code:
move C:\NPrintingTraining\ExternalRequestsXML\QVS.processed C:\NPrintingTraining\ExternalRequestsXML\QVS.request
It will rename the QVS.processed file to QVS.request. When the NPrinting Server find a .request file in the External Requests folder it will execute it.
Click on the green "+" (plus symbol) button on the right corner to create a new task
When activated this task will run the script we saved in QVS.bat
In this way you'll trigger the task to start after the finish of the reload and only if it ended successfully. This task runs the QVS.bat file who rename QVS.processed to QVS.request so NPrinting Server starts to distribute the reports.
When creating templates for generating reports, you will sometimes want to present information with formatting as it appears in QlikView. Keeping Qlikview source formats is the default setting in NPrinting.
In other cases, you may want to apply CSS inline style elements as you create templates in the HTML Template Editor. In order to do this, you need to perform the following steps:
After you have added a QlikView object as a table:
This will cause the content for all cells in all columns of the table to be exported from QlikView without formatting. The application of CSS inline style elements that you set in the HTML template will be applied (See section further below: "Allow Application of CSS Inline Style Elements for Specific Columns").
Be sure that your table object is a straight table in QlikView. Qlikview pivot tables must be converted to straight tables before selecting them to be included under the NPrinting Tables node or you will not have access to individual fields/columns.
If you want to keep source formatting for the majority of columns, leave the "Keep Source Formats" box checked for the table as a whole and proceed as follows:
Refer to "Which Formats Can I Use in Columns?".
The Keep Source Formats box has been cleared Gross Profit column
This is the original table with Keep Source Formats cleared for the first and last columns, a heading row added, and the original table headings hidden for each and every column.
Here is the code in full:
<html>
<body>
<table cellspacing=0 style="border-collapse:collapse;">
<tr style="width:0*;
font-family:Verdana;
font-size:small;
font-variant:small-caps;">
<th style="border:grey dashed 1px;">
Product Name
</th>
<th style="border:grey dashed 1px;">
Total Sales
</th>
<th style="border:grey dashed 1px;">
Gross Profit
</th>
<th style="border:grey dashed 1px;">
GP%
</th>
<th style="border:grey dashed 1px;">
Quantity
</th>
</tr>
<tr>
<td style="width:0*;
font-family:Verdana;
font-size:small;
font-weight:bold;
font-variant:small-caps;">
%%ProductName%%
</td>
<td>
%%Total Sales%%
</td>
<td>
%%Gross Profit%%
</td>
<td>
%%GP%_1%%
</td>
<td style="width:0*;
color:red;
font-family:Georgia;
font-size-adjust:0.40;
background-color:Yellow;
border:green solid 2px;
text-align:right;">
%%Quantity_1%%
</td>
</tr>
</table>
</body>
</html>
This sample output is simple but it gives you an idea of the possibilities.
Individual or lists of recipients can be imported by NPrinting and become an integral part of an NPrinting file. Sources include text and Excel files, databases, and LDAP directories. Here is how to import from LDAP directory subfolders.
For the purposes of this tutorial you must:
Click on the Execute button
Recipients can be added to or eliminated from the list by using the green '+' and red '-'. When you have finished adjusting the list, click on Import to import the recipients that you have specified. Click on Save to save this specified group of recipient import operation parameters in the Recipient Imports list.
Click on the Save and Close icon
Background
This approach utilizes a single Source Document with two Publisher tasks. Each task takes a parameter to define the authentication type. The value passed will either be USERID or NTNAME.
In conjunction with data reduction, NPrinting report writers will be able to create reports on their own data slice. This approach can also be used when creating a table for a Section Access based distribution list.
Steps
a. SET vPassword= ', PASSWORD';
4. Create two tasks in Publisher. Both tasks will be able to run without error regardless of the last saved authentication type.
b. The next task will distribute a USERID secured document.
Summary
Either task can be executed in any order multiples times consecutively. Output will be in two separate Document mounts, one with NTNAME security and the other with USERID.
Other Relevant Resources
The approach above can work along-side of the helpful tutorials put together by Jonny Poole on how to use NTNAME with On Demand and user-based filters.
Performance Consideration
Consideration must be made to determine whether report designers should be accessing documents hosted on the QlikView server and connected to applications through QVP or through UNC connections.
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:
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.
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.
Browse to C:\NPrintingTraining\QlikViewDocuments\ and:
Though this step is optional, it provides for more distinct, understandable file names
Click on the Save As icon to conclude template development.
Select the Section Access task in the list and click on the Run icon.
Please note the start of QlikView security with the Helen user, the start of Section Access, and the end of Section Access.
The two reports contain only the data pertinent to the recipient.
Some Microsoft 2013 users encounter the error message "Cannot find a supported template editor". This may be due to lack of the DocObject registry key with a value of 16.The simplest way to correct these registry keys is to download the attached file Office2013_RegistryKeys.zip and decompress it in the folder of your choice. You will find three separate files:
Office2013_x86.reg: regedit commands for 32 bit operating systems
Office2013_x64.reg: regedit commands for 64 bit operating systems
Office2013Registry.xlsx: list of the registry keys.
Double click on the file for your operating system and answer yes to all warnings. Your registry should be OK so try opening NPrinting template editor again and check that everything works correctly.If you cannot download the zip, you can copy and paste the following text into the corresponding file:
Office2013_x86.reg
[HKEY_CLASSES_ROOT\CLSID\{00020820-0000-0000-C000-000000000046}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\CLSID\{00020830-0000-0000-C000-000000000046}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\CLSID\{00020832-0000-0000-C000-000000000046}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\CLSID\{00020906-0000-0000-C000-000000000046}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\CLSID\{F4754C9B-64F5-4B40-8AF4-679732AC0607}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\CLSID\{18A06B6B-2F3F-4E2B-A611-52BE631B2D22}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\CLSID\{64818D10-4F9B-11CF-86EA-00AA00B929E8}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\CLSID\{CF4F55F4-8F87-4D47-80BB-5808164BB3F8}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\CLSID\{DC020317-E6E2-4A62-B9FA-B3EFE16626F4}\DocObject]
@="16"
Office2013_x64.reg
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00020820-0000-0000-C000-000000000046}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00020830-0000-0000-C000-000000000046}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00020832-0000-0000-C000-000000000046}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00020906-0000-0000-C000-000000000046}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{F4754C9B-64F5-4B40-8AF4-679732AC0607}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{18A06B6B-2F3F-4E2B-A611-52BE631B2D22}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{64818D10-4F9B-11CF-86EA-00AA00B929E8}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{CF4F55F4-8F87-4D47-80BB-5808164BB3F8}\DocObject]
@="16"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{DC020317-E6E2-4A62-B9FA-B3EFE16626F4}\DocObject]
@="16"
NPrinting allows you to create reports which are filtered according to parameters you set for your recipients. These reports can then be sent directly to a recipient folder that has been specified in the Recipient. Output to be sent can be in PDF or an image format such as JPEG or PNG, see How to Create Reports Based on QlikView Entities.
You can add as many Recipients to a Task as you want. Separate output, filtered using each Recipient's filter(s), will be created for each recipient. You can see and modify Recipient details by double clicking on a Recipient (modifications are saved in the Recipient and will be reflected in all future output which that recipient receives).
You can also create new recipients by clicking on the New button in the Recipients section of the tool ribbon. Than click on "Save and Close".
Add as many filters to your Task as are necessary. All Task output will be filtered using the Task filters. This will be in addition to Report filters and Recipient filters which are applied to specific Reports and/or Recipients
Each Salesman Folder did not exist before the task was run, but was created by the task.
There is no need to generate Office reports and then print them out by hand. NPrinting can send reports directly to printers to produce hard copies automatically. This tutorial shows how to create a task to do this.
For the purposes of this tutorial, you have launched NPrinting and opened an NPrinting file.
Give your new task a Name and enter a Description (optional)
If you need to send the same report to various printers, clone the task to create a separate task for each printer. You cannot currently print more than one copy of a report per task without running the task repeatedly.
Page size, orientation, margins, etc. must be set in the report template.
The option Print is not available in the reports that export an Entire QlikView Sheet in QlikView Entity reports. If you want to export an Entire QlikView Sheet you can do these steps:
Before clicking on the Run icon in the Task section of the menu bar, it may be a good idea to reflect on the number of pages that will be printed.
The "Use This Group Field" property has been added to the Table column Properties menu in Word, Excel, PowerPoint and HTML report templates. It is displayed only for dimensions and only if they contain a Cyclic Group. It has a predefined value, "(Active Field)" which will use the field which is active at run time. It is also possible to force NPrinting to display a specific dimension by selecting it from the list.
Formula and drill-down groups are not supported.
Click on the Save As icon
Drag and drop the CH305 - Top Sales table-node token into the template.
Drag and drop the CH305_1 - Top Sales table-node token into the template.
N.B. Active Field means the field of the group active at the moment of saving the QlikView document. In this case, though we haven't saved the QlikView document, the last active field is Country. If you use Active Field in an Excel report template and add the fields one by one, then you need to set Show Header to Show Above Tag Cell
Drag and drop the CH305_2 - Top Sales node token into the template.
Click on Preview in the Actions group
Notice that the table has been repeated but the first dimension displays a different field from the cyclic group and the other dimensions show the relevant data.
Click on the Save and Close icon.