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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Require Total Avg Amount on Report Header

Status
Not open for further replies.

ivanov

Programmer
May 7, 2002
4
CA
Here's how the report is set up.
Report Header >> Total Amount of Average
Group Header >> Item currencies
Group Footer >> Insert Summary Average of Item Currencies.
Created formula (fmlaGrandTotal) adding the Averages in Group Footer ->>
WhilePrintingRecords;
CurrencyVar GrandTotalExtendedPrice;
GrandTotalExtendedPrice := GrandTotalExtendedPrice + Average (items)
Need to get the value of GrandTotalExtendedPrice showing up on the Report Header.
How can I get this value appearing in the Report Header, if I reference a formula in the Report Header as
EvaluateAfter(fmlaGrandTotal) I get 0. Any ideas anyone.
Thank you for any assistance that you may provide.
 
If you look into evalaution times in the CR manuals you will see that the order of processing is
1) Run Time formulas
2) Summaries/Averages/Counts
3) Print Time Formulas

So you can use a WHILEPRINTINGRECORDS formula and a variable to add up your averages. But this is done as the report sections are being processed, so the Variable in the report Header will be zero, and in the Report Footer will be the correct value.

If that's not good enough the only other solution is a subreport to process the data second time.

Best wishes Editor and Publisher of Crystal Clear
 
Is the number of groups (currencies) fixed? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Hi Chelseatech,

Thank you for your reply. You just triggered by little brain cells to figure a better way to look at this. Thanks sooooooooooo much.
Also thanks kenhamady, but Chelseatech beat you to it.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top