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: 
Florentin74
Partner - Creator
Partner - Creator

Nprinting filter - Field filter with multiple dynamic values. On-Demand

Hi,

I am trying to obtain the following in an On-Demand report:

User selects two values from listboks in Nprinting On-Demand-App... The values selected are passed to a variable (vCompanySelection)... lets say the values Company1,Company2. (variable then contains the value : Company1,Company2

The same variable exists in the Nprinting App (Connection app)

I was kind of hoping that I could just use the variable in the Nprinting app like this :

Field filter on the field Company..

Value

=vCompany

But this does not work when selecting more than 1 value in the Nprinting On-Demand-App... It works fine on a single value..

Regards,

Anders

1 Solution

Accepted Solutions
Anonymous
Not applicable

Different strategy depending on the desired outcome.  Not sure of your development methodology, but I try to build my objects in QV exactly like I want to see them in my Nprinting reports.  That way, I can preview what they will look like and determine if I need to use variables or need to use current selections.

In this case, you do want to sum the data for two companies.  So, the question is are your objects giving you the desired final result in QV?  Not using filters in Nprinting should yield you output from QV as the current selections dictate.

Filtering is done on the NPrinting side.  If you make no current selections, NPrinting will grab all of your data and apply the filters while building the report.  Using current selections reduces the data set passed to NPrinting unless you specifically tell it not to in your source connection before it applies filters in Nprinting

It should not be cycling in Nprinting, unless you are telling it to.  If you don't cycle, you should get aggregated data for your selections.

I know it is not always practical, but I try to use images as my output, so that I can control the format and presentation in my report.  It also enables a WYSIWYG for my end user that wants to look at the data in a QVW and know that they will see the same output in the report on demand.

During our conversation in the last thread, I sent you a link on how to use variables from Nprinting to trigger values in a current selection box.

Nprinting - Filters vs Current Selections

It seems like there are many ways to get projects done and figuring it out is what we do.

So, if you are getting a combined financial statement, I would probably choose the current selections approach rather than the 9 list boxes.

View solution in original post

5 Replies
Anonymous
Not applicable

Hi Anders,

It looks like you are still having fun with your project. 

I am not sure about your logic of having more than 1 value for a variable.

If I create a text box and write the simple formula for one of my dimensions   =Year.   It does not display any results unless there is only one selection.   I think that logic works the same for variables.

So it sounds like you need to create two variables for your company name.  vCompany1 and vCompany2.  You do need to make sure the variables are created from separate tables so that the list in the second table is not filtered by the selection in the first.

Hope that helps.

Mike

Florentin74
Partner - Creator
Partner - Creator
Author

Hi Mike,

Yees... Still working on it...

A variable can contain all the selections one has made from 1 field (listbox)... 'Company1','Company2'... or Company1,Company2... But Nprinting does not understand this... Like for example set analysis would {<Company = {"$(vCompany)"} >}....

If the above does not work, then how does Nprinting handle it if I was using "Current selections" (instead of my approach with vaiables)... If I select two companies from a Listbox, and it is passed to the Nprinting document??? Can Nprinting handle this then?

In my case, the customer needs to see the a joined Income Statement from both companies (summed together).. Not in a company "cycle" in Nprinting..

I see what you are trying to tell me.. But then I would have to have 9 listbokses with each company. (or input box with 9 variables).

Would you suggest that I instead went for a Current selections approach??

Regards,

Anders

Anonymous
Not applicable

Different strategy depending on the desired outcome.  Not sure of your development methodology, but I try to build my objects in QV exactly like I want to see them in my Nprinting reports.  That way, I can preview what they will look like and determine if I need to use variables or need to use current selections.

In this case, you do want to sum the data for two companies.  So, the question is are your objects giving you the desired final result in QV?  Not using filters in Nprinting should yield you output from QV as the current selections dictate.

Filtering is done on the NPrinting side.  If you make no current selections, NPrinting will grab all of your data and apply the filters while building the report.  Using current selections reduces the data set passed to NPrinting unless you specifically tell it not to in your source connection before it applies filters in Nprinting

It should not be cycling in Nprinting, unless you are telling it to.  If you don't cycle, you should get aggregated data for your selections.

I know it is not always practical, but I try to use images as my output, so that I can control the format and presentation in my report.  It also enables a WYSIWYG for my end user that wants to look at the data in a QVW and know that they will see the same output in the report on demand.

During our conversation in the last thread, I sent you a link on how to use variables from Nprinting to trigger values in a current selection box.

Nprinting - Filters vs Current Selections

It seems like there are many ways to get projects done and figuring it out is what we do.

So, if you are getting a combined financial statement, I would probably choose the current selections approach rather than the 9 list boxes.

Florentin74
Partner - Creator
Partner - Creator
Author

Hi Mike,

Thanks for your input yet again... The filtering in Nprinting was not the way to go on this project... I created a new, based on current selections instead... The customer wants to be able to apply a whole lot of filters, and wants to be able to "switch" them on and off as he pleases... The only way to go for me, was the "current selections way", and then modify all objects as you said... A big job this was.. A lot of objects needed to be modified... 🙂 That was why I going  for the "Nprinting filtered"  solution first..

Well... Thanks a lot for all your help Mike..

Have a pleasant day...

Regards,

Anders

Anonymous
Not applicable

Anders,

Glad to hear you were able to work it out.  There is nothing like experience.  The next project you do, you will be asking all of these questions ahead of time.  Qlik Developers definitely need to have a little business analyst in them to avoid having to do work over again.