Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories
by roddy » Fri Aug 06, 2021 7:02 am
I am sorting a foundset and writing these to a related foundset that will be used in the printed Velocity. The sort order of the related foundset is getting lost in the report.
It is quite a complex sorting algorithm; I could add a simpler sort column in the printing foundset but I cannot figure out how to get the #foreach in the Velocity template to utilise a sorted order.
Any help would be much appreciated, thanks.
-
roddy
-
- Posts: 100
- Joined: Mon Oct 26, 2020 12:32 am
by roddy » Fri Aug 06, 2021 9:25 am
For anyone else finding this; I had to sort the original foundset; then I looped through each to write it to the foundset for the printing with the index as a sort_order column in the printing foundset. Once saved, I sort the printing foundset using the sort_order column and this then renders in the correct order.
-
roddy
-
- Posts: 100
- Joined: Mon Oct 26, 2020 12:32 am
Return to Programming with Servoy
Who is online
Users browsing this forum: alasdairs, Bing [Bot], mboegem and 9 guests