>>2) Company C(05) Ascending >> AccountCode C(05) Ascending >> DueAmount N(15,2) Descending > >I see, set the expresion to COMPANY + ACCOUNTCODE + STR(10^16 - DUEAMOUNT) or something close to that. You can do that date the same way.
I see problems with that approach. See what happens with these numbers: