Skip to Content
0
Former Member
Jul 03, 2007 at 12:40 PM

Manual Running Total

172 Views

Post Author: cjsmile2106

CA Forum: Formula

Hello everyone! I need some help and hope you guys can do it 😊

I have the following formula:

@extra linked

if ({machine.type} = 20 and {production.status} = 11 and {employee.descr} = next({employee.descr})) then 1 else 0

That formula seems to be working fine for me. I also need to Sum that formula. I do not have the option to insert a Sum based off that formula so I created a manual running total to perform the Sum. However my manual running total is not living up to expectations. I'm hoping you guys can tell me what I'm doing wrong. Here's my running total:

@Initialize (placed in the header)

WhilePrintingRecords;NumberVar RunningTotal;RunningTotal := 0;

@Evaluate (placed in the details section)

WhilePrintingRecords;NumberVar RunningTotal;RunningTotal := RunningTotal + {@extra linked}

@display (placed in the group footer)

WhilePrintingRecords;NumberVar RunningTotal;RunningTotal;

My running total display is not summing. It only shows the value "1". I'm using crystal 8.5.

Thank you!!!