5 Replies Latest reply: Jul 22, 2015 3:35 AM by Aaron Morgan RSS

    Sort order for levels within nPrinting?

    Aaron Morgan

      Hi there,


      I've created a number of excel reports with nPrinting, and have set levels up using a Customer Type within one of the reports. This works fine, i.e. each chart is appearing fine for each individual level, but the Customer Type is sorting alphabetically, so my top level is 'Independent' and my last one is 'Undisciplined'. As part of these types I have 'Total' and 'Freetrade' which is a combination of Independent and Undisciplined. Because of this, I want to change the sort order of my level so that I can control which appears first.


      At the minute I'm only able to do this by creating another field (Customer Type Sort Order) in Qlik and using this as the level and then using a formula (Only(Customer Type)) to return the Customer Type, but I wondered if there's a way to control the level order within nPrinting, or to atleast change it to load order instead of alphabetical?



        • Re: Sort order for levels within nPrinting?
          Aran Nathanson

          Ordering is based on the QlikView sort order for the dimension used in the level. There is no way to change that other than by:


          1. Changing the sort order of the dimension in the QVW
          2. Creating a dummy dimension (as you did) to set the sort order.


          If you were sorting values of a dimension in a table, you could use the Excel sorting to set the sort order rules, but for levels there are fewer options.

          • Re: Sort order for levels within nPrinting?
            Aadil M

            I encountered a similar problem and they way i solved it is by sorting the field in the script itself to the required format and then setting the sort in the document properties to the desired format.


            For instance if your level is customer type. Sort this field in the script itself in the same order you would want to generate the report in. After this in the document properties, verify the sorting order of the field is set to Load order-> Original.


            This will generate the report in the same order they way values or sorted in the QVW.


            another alternate option is, no matter what the sorting of values is in the tabels, you can still change the sorting of the field in the Document Properties and then generate the reports.


            hope this helps.


            • Re: Sort order for levels within nPrinting?
              Aaron Morgan

              Hi both,


              Thanks - completely forgot you can set the sort order as part of the document properties instead of just within a given object!