COTS database stores 'custom' field values in a single field regardless of type. Used SQL query to extract values for particular fields for particular cases. As a result, obtained repeating values for each iteration within case. Iteration is only grouping.
Placed fields in Details section. Had to create formula for most of them (IF {Command.Name}='MedLienServToDate1' then
If IsDate({Command.value}) then datevalue({Command.Value})
else cdate(1950,1,1)) to convert from string. Also had some numerics which are crux of issue here.
Used Maximum summary type in Group Footer to cull out desired value from repeated iterations.
So, Max of(AmtBilled) and Max of (AmtDue) display. Tried to create simple formula f(AmtPaid) subtracting them but 0.00 value. Tried Max of (AmtPaid) but gave me Max of (AmtBilled), Min gave me Max of (AmtDue). Tried to create formula embedding Summary in it (Maximum ({@fAmountBilled}) - Maximum ({@fAmtDue})) without success.
Sum of (AmtPaid) did equal Sum of (AmtBilled) - Sum of (AmtDue) in Report Footer.
Found that if I used second Sum of (AmtPaid) within Group Footer, it successfully subtacted and displayed Max of (AmtBilled) - Max of (AmtDue).
Don't know why it worked.