Using CR8.5
The sub report is on the detail line of my report. It calculates a Functional_Amount based a Detail_Line_ID.
The sub report consists of a single group, Detail_Line_ID.
In the group 1 header is a reset formula
//{@reset} Group#1 Header
whileprintingrecords;
shared currencyvar OCharges := 0;
shared currencyvar grOCharges := 0;
In the group 1 footer is a formula called OCharges
//{@OCharges} Group#1 Footer
whileprintingrecords;
shared currencyvar OCharges := Sum ({ACHARGE_TLORDER.FUNCTIONAL_AMT}, {ACHARGE_TLORDER.DETAIL_LINE_ID});
shared currencyvar grOCharges := grOCharges + OCharges
All sections are supressesed except group 1 footer.
In the main report I get a listing of each Detail_Line_ID's total, which is good.
The Group#1 Footer contails the formula
//{@OtherCharges} Group#1 Footer
whileprintingrecords;
shared currencyVar grOCharges;
grOCharges
Which is displaying the last detail records contents rather than the sum of the detail_line_ID's.
Where did I screw up?
The sub report is on the detail line of my report. It calculates a Functional_Amount based a Detail_Line_ID.
The sub report consists of a single group, Detail_Line_ID.
In the group 1 header is a reset formula
//{@reset} Group#1 Header
whileprintingrecords;
shared currencyvar OCharges := 0;
shared currencyvar grOCharges := 0;
In the group 1 footer is a formula called OCharges
//{@OCharges} Group#1 Footer
whileprintingrecords;
shared currencyvar OCharges := Sum ({ACHARGE_TLORDER.FUNCTIONAL_AMT}, {ACHARGE_TLORDER.DETAIL_LINE_ID});
shared currencyvar grOCharges := grOCharges + OCharges
All sections are supressesed except group 1 footer.
In the main report I get a listing of each Detail_Line_ID's total, which is good.
The Group#1 Footer contails the formula
//{@OtherCharges} Group#1 Footer
whileprintingrecords;
shared currencyVar grOCharges;
grOCharges
Which is displaying the last detail records contents rather than the sum of the detail_line_ID's.
Where did I screw up?