Report parameters

Martin Obongita martin.obongita at
Fri Jan 14 07:56:53 UTC 2022

 Hi Kelly,
My iPrintDataList looks like this:
code    colname    childCode    childName    parentCode    parentName------------------------------------------------------------------------------------------------------------------------
+254    Kenya    020    Nairobi    1    East Africa
+254    Kenya    041    Mombasa    1    East Africa
+256    Uganda    071    Kampala    1    East Africa
+256    Uganda    072    Entebbe    1    East Africa
+266    Zambia    055    Maputo    2    Southern Africa
+249    Sudan    018 Khartoum    3    North of Sahara Corridor
+250    Eqypt    077    Cairo    3    North of Sahara Corridor
+260    Cameroon    060    Yaounde    4    West Africa
+192    Nigeria    009    Abuja    4    West Africa
How do I sort this list by either code or by childCode or by parentCode?
I could also wish to sort by the Economic region, then sort by the country and then by the city, on the same report. (iReportSortByParent and iReportByRecord can be true simultaneously.
How do I sort the iPrintDataList to include totals before printing the report?
Kind regards, Martin O.

    On Friday, January 14, 2022, 10:23:37 AM GMT+3, Kelly Burgess <kellyb at> wrote:  
 Hi Martin,

It's hard to tell what's happening in your code because it isn't clear whether iReportSortByParent and iReportSortByRecord can be true simultaneously.  If they can't, then it's not clear what the unchanged $sorts.1 contains when the code assigns $sorts.2.  And it's not clear to me if your $printrecord code is in the report $construct, elsewhere in the report class, or outside of it.

I wonder if you couldn't just sort the list before you send it to the report, but clone the sorted column's values to an additional (unprinted) column whose name is already set in $sort.1 at design time, with the subtotal flag set.  You could actually do all of that sorting and column-cloning in the report $construct based on parameters.

Manage your list subscriptions at
Start a new message -> mailto:omnisdev-en at 

More information about the omnisdev-en mailing list