Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help me with formulas reverse to summarizing

Status
Not open for further replies.

Cores

Programmer
Oct 17, 2007
92
CA
Please help me with formulas reverse to summarizing:
Placed in Group Header:
//{@resetBalnce}
whileprintingrecords;

numbervar payment;
numbervar cancelled;
numbervar refund;
numbervar balance_sum;
payment:=0;
cancelled:=0;
refund:=0;
balance_sum:=0;
----------------------------------------------------------------------
//{@accum}
placed in the detail section:
whileprintingrecords;

numbervar approved:= {accounting_report_vw.approved_grant_amount};
numbervar payment:= payment + {accounting_report_vw.payment_gross_amount};
numbervar cancelled:= cancelled + {accounting_report_vw.ADJ_CANCELLATION_AMOUNT};
numbervar refund:= refund + {accounting_report_vw.ADJ_REFUND_AMOUNT};
numbervar balance_sum;
balance_sum:= approved - payment - cancelled + refund;
balance_sum
---------------------------------------------------------------------------
//{@displayBalance_Sum}
placed in the group footer
whileprintingrecords;
numbervar balance_sum
I need to display:
Approved Paid Cancelled Refund Balance
100000 50000 2500 2500 50000
50000 1300 1300 0
Total by Group 100000 100000 3800 3800 0

First line is OK but I receive negative numbers in the next lines.

Please help me with the formulas. Thanks!!
 
I have found solution - I created running totals for approved, payment, cancelled, and refund. Then created simple formula
{#run_approved}-{#run_paid}-{#run_cancelled}+{#run_refund}
and placed this formula in details section - it works well.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top