Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Nprinting - Filters vs Current Selections

I have a list of 1000 recipients that I have imported into NPrinting  along with the 4 filters that I would like to use in order to generate the custom reports for each recipient.   I used Excel to create my list.

When I am working in my QV app, I have a very large dataset and I use the current selections boxes to "reduce" the data down so that only that applicable data shows up in my charts.  I am then  capturing images of these charts and sending them to NPrinting.  When I use the on-demand function, it works perfectly

What I try to mass produce my reports by running a task with my recipient list, it appears to only be trying to "filter" the data that gets exported to Nprinting, rather than using the filters as current selections to create the proper charts.  In addition, I use variables based on the current selections of one of my fields to create normative values in another chart.

My request is this:

How can an Nprinting task be configured to pass those filters as Current Selections  ( like it does with On-Demand )?

Or does anyone know how to use a variable to dynamically add fields to the Current Selection box?

Perhaps I can just pass a variable to Nprinting that would automatically populate the current selections box for each report.

1 Solution

Accepted Solutions
Daniel_Jenkins
Specialist III
Specialist III

Hi Mike,

You can import variable based filters using the syntax :

[Connection].v\[VariableName]={[Value]<calculate>}

Where:

[Connection] is the name of the connection to the .qvw that contains the variable. This is optional.

[VariableName] is the name of the QlikView variable

[Value] is the value you want to set the variable to

<calculate>  flags the “Calculate” check box in the created filter. To be used when [Value] is a formula.

I have attached a sample project that imports and creates 2 recipients and 2 variable based filters, one with <calculate>.

Extract to folder C:\Temp\community\010 to preserve the paths used or change them in the nsq.

HTH - Daniel.

View solution in original post

20 Replies
Anonymous
Not applicable
Author

I have come up with a work around for my issue.  It is complicated enough that I am going to create a resource document and upload it to show how to fix.  If you are coming across this, know that the crux of the solution is to create variables that can be toggled to select fields when the variable changes.  I created a trigger in the QV document properties that selects the 4 fields I want based on the change of a variable.  I then add those variables in my Nprinting filters list.   When you run the task or job in Nprinting, it passes the variables to QV which evaluates them and makes my selections, thus "reducing" my dataset for my objects to be built on the desired data.   At this time, my only dilemma is trying to figure out how to buk import variables rather than filters to a recipient list. 

Not applicable
Author

Filter Syntax, Parameters, and Options for Importing Recipients – Customer Feedback for Vizubi

In above link is explained how you can import filter values in recipient import.

There are multiple parameters you can import.

You say using variables to make selections in qlikview document,

how is this different to using filter??

Anonymous
Not applicable
Author

Joonas,

Thanks for replying.

There is a significant difference.  When you use a "field" filter in Nprinting, the entire data set is selected and the filtering is done when the report is rendered in Nprinting.  When you use a "variable" filter in Nprinting, it passes the variable to the QV document and evaluates it.  In my case, I send 5 variables filters to QV and the change of the first variable triggers 4 select statements that assign the other 4 variables to current selections.  Then my report renders only with the reduced data in the charts. 

I can import "field" filters with the recipient import in NPrinting.  I need to be able to import "variable" filters.

Here is the recipient filter screen in Nprinting.  You can see that you can add fields and variables.

The import process only appears to allow you to import fields.

Fields

Filters.PNG

Variables

Filters variables.PNG

The other limitation is that I have to create an individual task for each of my reports so that I only get the data that I want in my charts.

For example, If I were to add 10 recipients to one report, it would gather the entire data set and process the data and render all 10 reports at the same time.   In my case, I am choosing images to be exported, so the data has to be selected to render the charts properly.

So, if you have a way of importing variables, you can be a hero today.

Not applicable
Author

1. Make a variable filter

2. map in the recipient import to name of that filter

3. magic happens?

Anonymous
Not applicable
Author

I can't see how to specify you are importing a variable filter.  The mapping choices, just have Filter 1, 2 ,3 ,4 and 5.   I have tried

  1. Putting Variable: in front of my filter field name
  2. Starting my filter field with v  ( that should indicate to Qlik a variable )

So, do you have one of those magic PDF documents that tells how to map a variable filter.

What am I missing?

Not applicable
Author

Filter knows itself which kind of filter it is (either field or variable)

You just map filterref1 to the NAME of the filter in the import recipient task.

Not applicable
Author

Joonas is correct - you can pre-build the filter in NPrinting and then assign that filter to the recipient on import.

This is only useful if the number of "variable" filters is low.

You need to use "FilterRef1", not "Filter1"

Anonymous
Not applicable
Author

Hi Aran,

Yours and Joonas statements somewhat contradict each other.  Joonas says Nprinting knows whether it is a field or variable and you said I have to choose Filter 1 or Filter Ref 1.   When I choose Filter Ref 1, and try to import a variable with my stated value, then it tries to go to my QV document and verify that the value exists.  I get an error message telling me that the value does not exist.  Of course it does not exist, it is a variable, not data stored in QV.

I just did an import with 5 filter fields.  I chose FilterRef1 and Filter Ref2 for 2 of the fields and Filter 1, 2 and 3 for the other 3 fields.  The 3 filter fields go in just fine to the recicpients, the ref fields fail with the error message.

If I send all 5 fields to filter and none to Ref, then all 5 import to the field.

Here is the error message I get when using FilterRef

import error.PNG

Aran,   My intention is to import 1000 recipients of which there will be at least 10 or more output folders and the 5 variables that I need to instruct Qlik on how to select the data and reduce it before capturing images to put in my final Nprinting report

Please advise


I would be happy to do a WebEx with Frank if you want to see a live version of what I am trying to accomplish

Not applicable
Author

  1. The process is:
    1. Build a "variable filter" manually in NPrinting. Name it VCurrentYear
    2. Put the value: "VCurrentYear" in a column in your import file/database next to all the recipients who will need this filter applied. All you need is the name of the filter. If you want to use multiple pre-built filters, you should be able to put them into a single cell with the following syntax:

      filtername1, filtername2...

    3. When setting up the import assign "FilterRef1" to that column
    4. When you run the import, the filter which you created manually in step 1 will be assigned to those recipients where that was the value.
  2. As long as each recipient needs 5 or fewer variable filters assigned to them, you'll be OK. This doesn't mean that you can use 5 variable filters in total for all of your recipients, it means that each recipient can only have up to 5.

Hope this makes it clearer.

Best

Aran