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

Conditional Running Totals

Status
Not open for further replies.

Monkey820

Technical User
Dec 11, 2003
62
US
I have two total fields that both are correct but need to be the same running total.
The first total is a formula @Evaulate and @Display which function is not to include in the sum the value of Operator requirements when the production Hours equal 0. It reads as such:

@Evaluate:
WhilePrintingRecords;
NumberVar RunningTotal;
If {PDAYPROD.PROD_HRS} = 0
then
RunningTotal := RunningTotal
Else
RunningTotal := RunningTotal + ToNumber ({STANDARD.OPERATOR})

@Display:
WhilePrintingRecords;
NumberVar RunningTotal;
RunningTotal;

The second is a running total that does not count the Operator value twice for duplicated records which is set to Evaulate on Mfg# group change and to reset on Shift group change.

I need a total that has both these conditions in the same formula. Any help is appreciated.

TIA,
Micky
 
Create formula
if {PDAYPROD.PROD_HRS}=0 then 0 else ToNumber ({STANDARD.OPERATOR})
and use it as argument to sum in your second running total formula.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top