|
-
Jun 18th, 2004, 03:48 PM
#2
The only way I have ever created a "Minimum of an Average" was to use 3 formulas which keep track of everything in a Global Variable.
This will not work if you print the value in the Group Header. You could probably use subreport (and a Shared Variable) for that...
Create these 3 Formulas..
1) In Group 2 Header; Name= ResetMinOfAvg; Suppress= True
Use to reset the value of the Global variable to the average of the first Group 3 within Group 2.
WhilePrintingRecords;
Global currencyVar MinOfAvg;
MinOfAvg := Average ({Table.Field}, {Table.GroupField});
2) In Group Footer 3; Name=MinOfAvg; Suppress=True
Use to see if the current Minimum value is less then the Average value calculated for the group.
WhilePrintingRecords;
Global currencyVar MinOfAvg;
If Average ({Table.Field}, {Table.GroupField}) < MinOfAvg Then
MinOfAvg := Average ({Table.Field}, {Table.GroupField}) ;
3) In Group 2 Footer; Name=DisplayMinOfAvg;Suppress=False
Use to display the MinOfAvg value.
WhilePrintingRecords;
Global currencyVar MinOfAvg;
MinOfAvg;
HTH
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|