20 Replies Latest reply: Nov 4, 2015 12:34 PM by Adam Krepistman RSS

    Nprinting - Filters vs Current Selections

    Mike Czerwonky

      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.

        • Re: Nprinting - Filters vs Current Selections
          Mike Czerwonky

          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. 

            • Re: Nprinting - Filters vs Current Selections

              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??

                • Re: Nprinting - Filters vs Current Selections
                  Mike Czerwonky

                  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.

                    • Re: Nprinting - Filters vs Current Selections

                      1. Make a variable filter

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

                      3. magic happens?

                        • Re: Nprinting - Filters vs Current Selections
                          Mike Czerwonky

                          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?

                            • Re: Nprinting - Filters vs Current Selections

                              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.

                                • Re: Nprinting - Filters vs Current Selections
                                  Aran Nathanson

                                  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"

                                    • Re: Nprinting - Filters vs Current Selections
                                      Mike Czerwonky

                                      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

                                        • Re: Nprinting - Filters vs Current Selections
                                          Aran Nathanson
                                          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

                                            • Re: Nprinting - Filters vs Current Selections
                                              Mike Czerwonky

                                              Aran,

                                               

                                              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.

                            • Re: Nprinting - Filters vs Current Selections
                              Adam Krepistman

                              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?

                                • Re: Nprinting - Filters vs Current Selections
                                  Mike Czerwonky

                                  Hi Adam,

                                   

                                  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,

                                   

                                  Mike

                                    • Re: Nprinting - Filters vs Current Selections
                                      Adam Krepistman

                                      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

                                      Possibility to Import Variable Filters from File – Customer Feedback for Vizubi

                                        • Re: Nprinting - Filters vs Current Selections
                                          Mike Czerwonky

                                          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!

                                            • Re: Nprinting - Filters vs Current Selections
                                              Adam Krepistman

                                              version 16 was just a rebranding after Qlik bought NPrinting so I am wondering if 15.6 was Nprinting's next scheduled release before the purchase.

                                               

                                              1000 minutes /60 minutes in an hour = 16.7 hours or 2 work days

                                               

                                              Now that is a use case

                                               

                                              good luck

                                              • Re: Nprinting - Filters vs Current Selections
                                                Daniel Jenkins

                                                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.

                                                  • Re: Nprinting - Filters vs Current Selections
                                                    Mike Czerwonky

                                                    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.

                                                     

                                                    Nprinting Message.PNG

                                                     

                                                    So, I am using version 16.0.0.0  which I am assuming is the latest release.   So, what version are you using and did you get it before Qlik bought NPrinting?

                                                    • Re: Nprinting - Filters vs Current Selections
                                                      Mike Czerwonky

                                                      Daniel,

                                                       

                                                      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

                                                       

                                                      Import Fixed.PNG

                                                       

                                                      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!