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: 
steeramp
Partner - Creator II
Partner - Creator II

NPRINTING - Sort page excel from field

Hi to all,

How can I make sure that the pages produced by the report are in order of month ( January - December) ?

In my case using the field "Période_MoisAnnée_Décalée"

steeramp_1-1697624322734.png

 

Labels (1)
1 Solution

Accepted Solutions
andregas
Partner - Creator II
Partner - Creator II

Hello @steeramp ,

Actually you are using the month as a level, that isn't a cycle page.

As metioned by other users, the order must be done on qlik connection in the load script. You must add a dual value to your month text field; dual assigns a number value to a corresponding text value of the field, so you can order by number a text field.

Regards

View solution in original post

9 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, 

this topic was already discussed: https://community.qlik.com/t5/Qlik-NPrinting/how-to-specify-a-sort-order-for-pages-in-excel-report/t...

Solution is to use Dual() field for page 

 

cheers

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Frank_S
Support
Support

Here is a similar solution...

https://community.qlik.com/t5/Qlik-NPrinting/Sorting-levels-in-NPrinting/m-p/1768367/highlight/true#...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

@steeramp To clarify - @Frank_S  solution will work with levels but will not work with Pages where tables cannot be used!

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
steeramp
Partner - Creator II
Partner - Creator II
Author

Thanks @Frank_S  but I think it is not possible to do Template Editor on an Excel Report.

steeramp
Partner - Creator II
Partner - Creator II
Author

Hi @Lech_Miszkiewicz  , 

 

I did not understand at what level I need to add the new DUAL field. This is my report today: 

 
 

2023-10-19_8-50-56.jpg

andregas
Partner - Creator II
Partner - Creator II

Hello @steeramp ,

Actually you are using the month as a level, that isn't a cycle page.

As metioned by other users, the order must be done on qlik connection in the load script. You must add a dual value to your month text field; dual assigns a number value to a corresponding text value of the field, so you can order by number a text field.

Regards

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @steeramp 

In your description you are saying: "How can I make sure that the pages produced by the report are in order of month ( January - December) ?"

Pages in NPrinting excel template are those objects at the very top left side of NPrinting designer and they create individual sheets for each value of the field. Based on your description I assumed that is what you referred to hence I suggested creating Dual() field in Qlik Sense load script and use that in the Page. Looking closely on your template picture you are actually using "Levels" which I have missed as the "Level" label was not in english therefore follow @Franks suggestion.

Now If you are talking about sorting values in level please use @Frank_S suggestion where you can first create straight table object in Qlik Sense/QlikView and sort values in the order you want directly in Qlik. Once you do that you need to regenerate metadata and bring the new table object as level and use it instead of your current field. Make sure in your table field names dont have "=" sign in front of them as then they are not treated as fields but as calculated dimensions and you will not be able to use them as level. I saw on your template screenshot that you have many dimension fields starting with "=" sign which for those very reason is not really good practice.

cheers

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @steeramp 

not sure what you mean that "it is not possible to do Template Editor on an Excel Report."?

It is definitely possible.

cheers

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
steeramp
Partner - Creator II
Partner - Creator II
Author

Great ! It was enough to transform the field to DUAL and everything worked , Thank you @Lech_Miszkiewicz  @Frank_S  @andregas