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.
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??
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.
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.
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
- Putting Variable: in front of my filter field name
- 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?
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
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
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
- The process is:
- Build a "variable filter" manually in NPrinting. Name it VCurrentYear
- 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:
- When setting up the import assign "FilterRef1" to that column
- 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.
- 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.
I have tried what you have explained above and without success. It appears that this method is asking QV for the value to use as a field filter based on calculation. For example, I think this means if I choose vCurrentYear, I am using the year 2015 as calculated by my QV document and using it to filter the data.
vCurrentYear is not the value. vCurrentYear is the variable filter name and I want to tell QV that vCurrentYear is 2014 or 2015 or whatever I want.
I want to supply Nprinting with the value for the variable and the values could be different for every recipient. When I manually create variables with values I supply, then I can run a task just fine and get the results I want. I just don't want to manually type in 1000 of them.
I believe that we need a direct conversation to resolve this. Can you please have Frank contact me and arrange for a WebEx. I am sure that he has my e-mail address available from past conversations.
With my method you can assign existing filters to recipients you import with NPrinting.
With my method you can't build new filters or alter existing filters of any kind including those based on variables.
If you're trying to load recipients and build and assign variable based filters, that can't be done using NPrinting.
- The process is:
When a filter is being applied, it mimics making selection criteria in the applciation - if you have a large report that has filters, when you run it from designer, switch over to the QV applciation and you can see selections being made based on your filters. You can also create filterin nprinting for the year field and make it dynamic so you do not have to chnage it all of the time
the attached article shows how to make a static and dynamic filter, I have used this several times at the report and task level.
I agree with Aran as I am not sure why using nprinting filters will not meet your needs.
is there a small qvw and nsq you can provide to better explain and show the issue or concern?
Thanks for replying. I am not experiencing Nprinting filtering like you are. If you have read this whole thread, you know that I am trying to use Nprinting to tell Qlikview to make selections of 4 fields so that it will reduce my data in my charts. I am exporting images, so it is mandatory that the charts are reduced to the desired data before sent to Nprinting.
Here is what I am doing to make it work. I create a filter and identify a VARIABLE not a FIELD. In the VARIABLE filter, I put my variable name from Qlikview and the value that I want to send over. I actually have 4 variables that I want to use for the task I want to run. When I execute the task in Nprinting it sends my variables to Qlikview. I have a trigger setup in the document properties, that senses a change to my variable and then triggers 4 select action statements. These select statement assign my 4 variables to the fields that I want selected thus reducing my data. When the Nprinting report finished collecting my data, the variables are reset back to the default state of zero. When the next task runs it does the same thing. Thus I can batch run 100 or more tasks ( each task gathers one report based on the variables ) and have the variables only get me the data ( images) sent back that I want.
I had to painfully key in 180 filters in Nprinting and add the variables that I wanted to add, because the import recipient function will only let you import FIELD filters and not VARIABLE filters
If you do not use variables and try to use field filters, then Nprinting collects your entire data set from your Qlikview app and then does the filtering when rendering. That will not work for my project,
Also, when I setup my report with variables and push them, I can get my reports to render in 30 seconds or less. That is 3-4 times faster than I can render them if I am using On-Demand from an Access Point
So, if Qlik would enable me to import data to a filter or directly to a task rather than a recipient or let me import and save to the variable fields, then I would have a lot more available to do production rather than data entry
This is actually pretty slick and I am guessing that not many know about it, as I have seen no documentation telling me how to do this. I figured it out by necessity.
Let me know if you have any questions,
quite impressive. I did read the entire thread but did not completely understand, but your recent explantaion clears it up
yes, having the ability to import filters and fields (currently exists), variables or bookmars would be quite beneficial.
I did find something on the Qlik/NPrinting site that said this functionality was completed and was going to be in realese 15.6 - I wonder if it fell though after Qlik bout NPrinting
below is the link
I am on Version 16.0.0 so it they made this functional, I sure would love to have the process for getting it done as I have another 1000 filters to create and It takes me about a minute per filter to make. I am a much better developer than I am a data entry clerk. Aran, what happened with this? Did this import function make it to production? If you need a beta tester, I am ready to help!
You can import variable based filters using the syntax :
[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.
VFILT.zip 137.9 K
With all due respect to Mr. Nathanson, I am amazed that no one from Qlik has mentioned this option and directed me to this answer in the last week. When I try to open your NSQ file, it gives me this error message.
So, I am using version 184.108.40.206 which I am assuming is the latest release. So, what version are you using and did you get it before Qlik bought NPrinting?
You are a stud! You have solved my problem. I was able to import all 1193 of my filters in 15 seconds. I will be creating a document to upload to the resource section describing how to do this and the other fun aspects of my project. Here is the quick fix for anyone trying to import variables from Excel. You have to put v\ in front of your variable name and include = between the variable and the value
The net result is that you can run a task in Nprinting that will send your variables to QV. If you use a document trigger to monitor variable changes, then the variables can become your selections and thus reduce the data sent to your report. I just ran a job with 180 tasks ( individual reports with different variables ) and it took 100 minutes to run. That is about 35 seconds per report. When I was executing them On-Demand from Access Point it was taking almost 2 minutes per report.
As Daniel pointed out, this was fixed in release 15.6. Strangely, this process is not mentioned in the Nprinting Filter and Import Recipients documentation.
Aran, I will be in Orlando in May 2016 and you owe me a cold beer or two!