5 Replies Latest reply: Jan 15, 2016 7:35 AM by Mike Czerwonky RSS

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

    Anders Florentin Hansen

      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

        • Re: Nprinting filter - Field filter with multiple dynamic values. On-Demand
          Mike Czerwonky

          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

            • Re: Nprinting filter - Field filter with multiple dynamic values. On-Demand
              Anders Florentin Hansen

              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

                • Re: Nprinting filter - Field filter with multiple dynamic values. On-Demand
                  Mike Czerwonky

                  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.