GetNthRecord can be used with the Get (RecordNumber ) function to refer to preceding (or trailing) records in the portal.
That's amazing! So GetNthRecord(targTotal; Get(RecordNumber) - 1).
It works, thanks a million! ; )
Hey, just an update/conclusion: I managed to get a working version through "custom functions"... using the GetNthRecord function (but not the previous line like I had asked). Basically you make a special 'item' that will appear in the record, and have a calculation field a) dectect if it is the 'special' subtotal item then b) sum up all the records above it.
I added an extra level by getting a subtotal item to store the previous subtitle item and subtract it from its total, meaning that you can have a list of records broken by subtotal lines that will give totals below the last subtitle line, and they can be placed anywhere you like.
I added a third level by making the record rows manually sortable into any order.
I could post the code if anyone's interested - it's not really that complicated, and I owe the drag n' trop/record order technique to someone else.
Thanks for your input, laters,