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!

sum a formula for Report Footer Section 1

Status
Not open for further replies.

rwn

Technical User
Dec 14, 2002
420
US
I'm curious if this formula @ExtPrice can be totaled and show in the report Footer. Thanks to all!!!


if{#RTotal4} = 1
and isnull({Additional_Charge.Est_Price} )
and {Delivery.Remaining_Quantity} > 0
then {Delivery.Remaining_Quantity}*{Job.Unit_Price}

else if{#RTotal4} = 1
and {Delivery.Remaining_Quantity} > 0
then {Additional_Charge.Est_Price}+({Delivery.Remaining_Quantity}*{Job.Unit_Price})

else ({Delivery.Remaining_Quantity}*{Job.Unit_Price})
 
You can create two formulas:

//{@accum} to be placed in the section where your formula is:

whileprintingrecords;
currencyvar sumextpr := sumextpr + {@yourformula};

Then in the report footer use:

//{@display}:
whileprintingrecords;
currencyvar sumextpr;

If your formula is not a currency, use numbervar instead of currencyvar in both formulas.

I don't know how your running total is set up, but there is probably a way of building the elements right into the {@accum} formula.

-LB
 
Very interesting. So the sumextpr VAR adds to the @yourformula on each detail line and then the sumextpr in the group footers show the last value.

Thank you!
 
If you are trying to display a group total, then you need to add a reset formula to the group header:

whileprintingrecords;
currencyvar sumextpr;
if not inrepeatedgroupheader then
sumextpr := 0;

Note that you need to have separate variables if you want both group and report totals.

-LB
 
Sorry I meant Report Footer Total, NOT Group total. Thanks for the clarification.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top