The Pitfalls of NPrinting Filters – Part 2 (Search string filters)

I hope you have enjoyed reading first part on the “filters subject”. I tried to cover basics there. What I did not mention is that I am not NPrinting R&D person, so i do not have ultimate knowledge about NPrinting and whatever i write here is just based on my experience with the tool, testing and “build-try/run” approach. Also my conclusions are purely based on observations and available information from help document. With that being said we can move on to the second part of “filters subject”.

Search string: NPrinting 16 contained very useful filter option, where we were able to use “search” as parameter. We could use search in few different ways for example: ProductName like “*Shirt*” or Country where Sum(Sales)>10000.

This approach is well documented on community so i will not duplicate already existing documents, instead i will just point you where they are:

Bookmark search filter and search filter

Unfortunately above mentioned filtering options do not exist in NPrinting 17 and above. Current version February 2019 still does not support search filters. So how can you go about it?

Both methods which I am going to describe are based on changes done directly in Qlik application to accommodate required filter. The first method is to use Qlik load script and include logic in it. If i want to create a NPrinting filter, filtering all “Product Names” which have “*Shirt*” word in it, I can simply create a flag field in data model and refer to it in NPrinting. My flag would be created by using following formula: .“… If([Product Name] like ‘*Shirt*’,1,0) as NPrintingShirtFlag…”. After reloading metadata in NPrinting I can go to filters and choose: Field: NPrinitngShirtFlag , numeric value is: 1. I am aware that if you have many “wildcard search” filters in your NPrinting application this method may be clunky and not very useful, but at the moment this is the only working method.

What can I do to filter my report based on Sales by Country values, assuming that i need to have few thresholds : 15000$, 16000$ and 17000$? Well – this is more complicated and I tend to use advanced Set Analysis for this purpose. First of all i create a data island field in my Qlik data model which contain required tresholds . This will be used in NPrinting as field to apply filters on.


The next step is to build all charts and objects using advanced Set Analysis. In this simple example I will use following setup: Chart: Table, Dimension: Customer, Expression:

Sum({<Country = {“=Sum(Sales)>=$(=Min(NP_Filter))”}>}Sales)

The above formula will work based on the selection on NP_Filter field , which then can be applied normally in NPrinting.

I understand that this is workaround / approach which requires a lot of customization. This approach also requires usually dedicated objects for NPrinting reports. In my humble opinion every NPrinting report should run on dedicated qvw/qvf file to maximize on performance and usability except from those which do not require any tweaking and are not built on top of not supported documents (read help document about it)

Attached to this is the QVW file with solution sample.

Any feedback, questions? Do not hesitate to comment or ask below!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s