1 Reply Latest reply: Oct 13, 2015 11:46 AM by Kevin Bertsch RSS

    Using IncludeFiles to reduce filter maintenance

    Kevin Bertsch

      At my firm, we produce a lot of reports filtered to US Sales, Canadian Sales, Customer Service Reps, etc. These positions go through a fair amount of turnover, and when the filters were hard-coded in nPrinting, each change meant I had to go through (say) five or six different Sales Reports, and change the filter to add Tom, and remove Harry.

       

      Now, I use IncludeFiles to eliminate the need to change filters. I created an Excel file with separate tabs for each groups, and in each tab, I put in the Group name, and the member ID. ugroup.PNG

       

      Then, I have the following code in a text file:

      ussales.png

       

      This code is 'borrowed' from someone (Rob Wunderlich, maybe?) and I am just reusing it. It steps through the members, and creates a comma separated, quote delineated string, e.g 'BMOR', 'EKES', 'HPRI', 'JHAR', 'JSIL', which is then assigned to the variable "vUSSales".


      Now, in my nPrinting filters, I can select the field "Sales Rep", and set the value equal to =$(vUSSales) <- Note that the "dollar-sign-expansion" is required. 

       

      This means that our Admin staff can go into the Excel file, add or delete or modify the members of any group/value of any field that is to be used in a filter without knowing anything about nPrinting or QV, and, much more important, without my involvement. This has simplified and sped up our reporting process and eliminated a number of errors. I currently have 13 tabs in my Excel file, covering everything from Sales Rep to Holiday dates, to Titles to be searched.