Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW

Custom sorting in Qlik NPrinting PixelPerfect tables

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Ruggero_Piccoli
Support
Support

Custom sorting in Qlik NPrinting PixelPerfect tables

Last Update:

Apr 19, 2022 5:07:46 AM

Updated By:

Sonja_Bauernfeind

Created date:

Oct 5, 2017 9:43:07 AM

Data in PixelPerfect tables are sorted in the same way as they are in the source QlikView document or Qlik Sense app. This article illustrates how to set a different sorting criteria directly in a PixelPerfect template. In the first part by using an existing column and in the second part the sort order is based on a calculated column.

 

Environment:

Qlik NPrinting 

 

  1. Create a new PixelPerfect template with a level and a details band as shown in:

    Sonja_Bauernfeind_0-1650358661753.png

     

  2. If you run a preview, you will see that data is sorted by Segment in alphabetical order.

    Sonja_Bauernfeind_1-1650358684181.png

     

  3. To sort the data by Sales Representative, the second column, add a new group header:
    1. Right-click on the Detail1 band
    2. Select Insert Band
    3. Click on Group Header
    4. Don't insert any column header in this band. We will add headers after.

      Sonja_Bauernfeind_2-1650358718575.png

       

  4. Now we start the steps to set the Sales Rap Name column as sorting criteria. While keeping the GroupHeader1 selected, click on the three dots on the right of the Group Field property. The GroupField Collection Editor appears.

    Sonja_Bauernfeind_3-1650358743830.png

     

  5. Click on Add on the left bottom area.

    Sonja_Bauernfeind_4-1650358762483.png

     

  6. Open the Field Name drop-down menu and select the Sales Rap Name column.

    Sonja_Bauernfeind_5-1650358788879.png

     

  7. Confirm by clicking on Ok. Run a preview, data will appear sorted by Sales Rap Name.

    Sonja_Bauernfeind_6-1650358947229.png

  8. Now we will create a calculated column that will be used as new sorting criteria. It is not necessary to made this new column visible in the report in order to use it as sorting criteria. This is just an example.
    1. Right-click on the table name in the Levels node
    2. Click on Add Calculated Field
    3. Set New_Sort_Order as (Name)

      Sonja_Bauernfeind_7-1650358990156.png

       

  9. Open the Expression editor by clicking on the three dots on its right.

    Insert the formula Round(1/[NPPsJt],5 )*100000. Remember that this is just an example and that in a formula you can use only the fields that are available in the Levels node.

    Sonja_Bauernfeind_8-1650359018564.png

     

  10. Confirm by clicking ok.

    If you want you can create the space to add this new calculated field in the table, but it is not mandatory. We add it to have a more clear explanation.

    Sonja_Bauernfeind_10-1650359095885.png

     

  11. To use the new column New_Sort_Order as sorting order:
    1. Select the GroupHeader1 band
    2. Open the Group Fields property

      Sonja_Bauernfeind_11-1650359122049.png

       

  12. Set the column New_Sort_Order as Group Field.

    Sonja_Bauernfeind_12-1650359159630.png

     

  13. Confirm by clicking on OK and create a preview.

    Sonja_Bauernfeind_13-1650359183937.png

     

  14. To add the column headers, do the following:
    1. Right-click on GroupHeader1
    2. Select Insert Band
    3. Click on Group Header
    4. Drag and drop the fields from the Levels node by keeping the right button of the mouse pressed
    5. Set the headers format as you prefer

      Sonja_Bauernfeind_14-1650359223183.png

  15. Run a preview

    Sonja_Bauernfeind_15-1650359253702.png

     

 

Labels (1)
Version history
Last update:
‎2022-04-19 05:07 AM
Updated by: