I have an array like this:
aRezult := { cBillNumber, cName, nYear}
I need to sort on two fields cBillNumber(character element) and nYear (numeric element)
Unsorted data looks like this for example (randomly mixed years and bills):
aRezult := { 4, cName, 2011 }
aRezult := { 1, cName, 2012 }
aRezult := { 2, cName, 2012 }
aRezult := { 5, cName, 2011 }
aRezult := { 3, cName, 2012 }
aRezult := { 4, cName, 2012 }
aRezult := { 1, cName, 2011 }
aRezult := { 2, cName, 2011 }
aRezult := { 3, cName, 2011 }
aRezult := { 5, cName, 2012 }
I know how to sort data in multidimensional array if I want to sort on only one element.
In an example below, I can easily sort by BillNumber for example and get the result like this:
aRezult := { 1, cName, 2011 }
aRezult := { 1, cName, 2012 }
aRezult := { 2, cName, 2011 }
aRezult := { 2, cName, 2012 }
aRezult := { 3, cName, 2011 }
aRezult := { 3, cName, 2012 }
aRezult := { 4, cName, 2011 }
aRezult := { 4, cName, 2012 }
aRezult := { 5, cName, 2011 }
aRezult := { 5, cName, 2012 }
What I need is to sort by BillNumbers inside a year, so the result would be like:
aRezult := { 1, cName, 2011 }
aRezult := { 2, cName, 2011 }
aRezult := { 3, cName, 2011 }
aRezult := { 4, cName, 2011 }
aRezult := { 5, cName, 2011 }
aRezult := { 1, cName, 2012 }
aRezult := { 2, cName, 2012 }
aRezult := { 3, cName, 2012 }
aRezult := { 4, cName, 2012 }
aRezult := { 5, cName, 2012 }
Seems I am too tired today...
Please help