Recent Documents
-
Loading Image files stored in database into a Qlik Sense App
You can load images stored in a database in BLOB format into Qlik Sense by converting to Base64 encoded format in the SQL load script. Further more, ... Show MoreYou can load images stored in a database in BLOB format into Qlik Sense by converting to Base64 encoded format in the SQL load script.
Further more, you can render the image in the Sense UI using the native Qlik Sense Map object. This supported object supports expression based sourcing / displaying of the image both as a data field and as a URL to a HTTP accessible image.
The attached example walks through the setup using the sample AdventureWorksDW SQL database (which contains image files stored as BLOBs) along with both Qlik Sense and NPrinting.
This technique provides a similar alternative to the BUNDLE load technique which was available in QlikView.
-
Send out multiple emails for a single Publish Task in NPrinting 17+
A request i sometimes see from customers upgrading from NPrinting v16 is the ability to send multiple emails to the same user for the same NPrinting ... Show MoreA request i sometimes see from customers upgrading from NPrinting v16 is the ability to send multiple emails to the same user for the same NPrinting Publish Task.
We can use a 'cycle' to send different filtered copies of the same report in the same email, but sometimes we want those filtered reports to be split by email.
Also, sometimes its not just for one user but a combination of users.
Basically we want to send out the same report filtered different ways for different people in different emails....
The solution in v17+ is to use the API for this request and we can use the Qlik REST Connector inside the load script of a QlikView QVW or a Qlik Sense app to sequentially run the task changing the recipients and filters with each task execution. By changing the recipients and their filters with each task execution, the recipients receive the reports in the task in different emails.
For reference, see the following resource on how to setup a Qlik load script to communicate with the NPrinting API
https://help.qlik.com/en-US/nprinting/April2019/APIs/NP+API/index.html
In the attached sample you will find the following approach
1. Pre-create the Publish Task in NPrinting with the required report(s) and distribute the task to an NPrinting group
- Pre-create the intended recipients in NPrinting but do not assign the recipients to the NPrinting group.
- It is possible to create the Users dynamically for a more dynamic solution.
- It is NOT currently possible (june 2019 release) to assign an NPrinting group to a task, so the task/group combination must be pre-created.
In this example the name of the task is "Email Management Reports" . Make a note of it because we will use the name in the Qlik load script so that we can trigger the task by name.
In this example, the task distributes to the NPrinting Group: Managers . Make a note of the Group name since we will use the Qlik script to update the group membership by group name with the list of user's by name
In this example, the users that will be used are called: Jonathan Poole and NPrinting. Make a note of the names as the script will look up these users by name in order to add them to the NPrinting Group and associate them to the filters.
2. Pre-create the filters that you'd like to apply with each task execution
- It is possible to create NP filters on the fly if you truly want a dynamic situation.
- No need to associate the filters to the user or task. The script will associate the filters to the user dynamically .
In this example the 3 filters that i'll be using are named: EMEA , ASIA, AMERICAS. Make a note of the name as these filter names will be referenced by the load script which will dynamically associate the filters by name to the user's by name.
3. Edit the load script to load the NP Users and NP Filters that you want applied to each task execution. Each record of the LOAD represents a different execution
In this example recall that the Task was named "Email Management Reports" and the Group was named "Managers" .
Note that you will also have to update the NPrinting server URL, the QlikView Server (from where you are running the load script) as well as the two REST connections to GET and POST requests to the NPrinting API respectively
4. Next is to LOAD the recipient/filter combinations you would like to apply to the NPrinting Publish Task for each iteration:
In this example the task will be executed 3 times , once per record.
The 1st execution will send the report to the user named: NPrinting with the filter: ASIAPAC
The 2nd execution will send the report to the user named: Jonathan Poole with the filter: EMEA
The 3rd execution will send the report to the user named: Jonathan Poole with the filter: AMERICAS
In summary - NPrinting will get the report filtered by the Region=ASIAPAC in 1 email while Jonathan Poole will get two distinct emails.. .one filtering the report by EMEA , the other by AMERICAS
5. There is a summary of the executions presented to the user upon completion
-
The Multi-Report NPrinting template that conditionally renders content
Overview It is possible to conditionally include/exclude content in a single NPrinting template based on data filters. This is applicable to all fil... Show MoreOverview
It is possible to conditionally include/exclude content in a single NPrinting template based on data filters. This is applicable to all filter types (Task, Report, User,Object) as well as cycling and on-demand scenarios.
The technique is 100% dependent on the fact that if content exists inside a level, and the level evaluates to no values, the content is ignored during report generation.
If we add a data island to the QlikView or Qlik Sense source application that evaluates to a single or no values depending on filter conditions, then we can control whether a report is generated with or without content inside the level in the report template.
In the first part of this article we setup a report template to conditionally hide and show different content from the same report template depending on an on-demand selection or an NPrinting filter. The report template will have multiple app objects : pie chart, table chart etc... and a field selection will determine where the NPrinting report will include or exclude the chart.
In the second part we extend the technique to leverage the 'pages' feature as well so that we can not only conditionally include/exclude content but essentially design multiple whole reports in a single NPrinting template and generate different reports template. This allows us to condense styling and layouts and centralize code into a single template. That reduces the number of templates that need to be deployed and reduces change management updates making for a more scalable deployment model.
PART I: Using levels to conditionally include content into a report from a single template
The following screen print shows a Qlik Sense Dashboard that contains an an NPrinting On-Demand report:
Qlik Sense Dashboard - OnDemand Button Highlighted
In this dashboard there is a data model field "Chart" showing 2 data values (Pie,Table) through a Filter Pane called "Chart Selection".
Upon selection of "Pie" a Pie is shown in the dashboard as follows
Qlik Sense Dashboard - Pie Chart Selected
When the user clicks 'Run Report' , the selections are passed to NPrinting , including the selection Chart='Pie'. Upon completion the on-demand executions pane shows a download icon
On-Demand Report Execution-Pie Chart Selected
..and when opened NPrinting has included the same pie chart filtered correctly.
NPrinting Report - Pie Chart included
Likewise, if the user were to change the field selection to Chart='Table' and submit a new on-demand request (They may also change other selections such as the Names....
Qlik Sense Dashboard - Table Selected
..and after downloading the result of the new execution...
On-Demand Report Execution - Table Selected
The Report is generated with the Table
NPrinting Report - Table included
In order to create this sample the following are required:
1. November 2018 Qlik Sense. These techniques use the On-Demand button included in the dashboard bundle with November 2018 Qlik Sense
2. A new data model field that includes names of the different App Objects to include (or exclude).
3. Associations to additional data model fields that include just one value (one field with one value per App Object)
4. NPrinting levels in the Report Template (one per App Object)
5. Report Template Error handling enabled
The new data model fields and associations can be seen in the following screen prints:
The ShowPie data model field is dedicated to the 'Pie' App Object and the ShowTable data model is dedicated to the 'Table' App object such that, associatively, ShowPie has NULL values if the user selects 'Table' for 'Chart' and ShowTable has NULL values if the user selects 'Pie' for 'Chart'
Whats
Now, author the NPrinting Report to include levels for each data model field dedicated to the App object (ShowPie,ShowTable). And place the 'Pie' App Object and the 'Table' App object within the respective level sections of the report.
Finally, enable the following report template property so that NPrinting does not error out when either LEVEL evaluates to NULL
This technique is valid in any Report Template where you use levels.
Attached is a sample that for reference. Note that the sample has other techniques around on-demand including how to conditionally show the On-Demand button only after filtering the data set to a limited number of records.
Since PowerPoint templates do not support levels, the technique is limited but still possible by using the 'pages' features which does work with the same techniques .
PART II: Add pages to conditionally render different reports from a single template
We can build on the technique to do design multiple 'whole' reports in a single template and generate different reports based on the same field selection technique . To do this, we must utilize the 'pages' feature in conjunction with the 'levels' feature documented above.
In the updated example below, the name and fields of the 'ChartControl' Table has been updated to reflect this intended to be a 'ReportControl' .
The associative logic eliminates Report1 or Report2 based on the selection in the 'Report' field.
In the associative model , the data island still uses a central control table with a group (two in this case) of single record boolean tables for each possible report
In the updated version of the report template below , a PAGE has been added based on the 'Report' Field in the 'ReportControl'
Some of the elements (in blue below) will include styling and content that is common to both reports. They can include dynamic objects, variables, formulas or 3rd party content.
Other elements ( green, orange) will be specific to each report.
When no filters / selections , the reports are paginated. Depending on the output and template this will result in page breaking , multiple sheets , multiple slide.
Otherwise , with just one Report selected, only the content necessary for the chosen report is included
For publish tasks, NPrinting Filters can be added in the NPrinting Web Console , through and Excel Import Task, or via the REST API.
Here the same two filters added in the NPrinting Console
Detailed Filter descriptions below
The filters can be used as a Task Filter, Report Filter, or User Filter to ensure the right users are sent the right reports at the right time using the same template.
In addition, you can build ALL the reports at once using the 'Cycle' feature.