cancer2006
Programmer
I am using CRW8.5 and Access97. I have to calculate the number of active and terminated employees in different dpeartments. I am able to group the report by department, which is simple. I am not able to initialize the variables before the next department and as a result the variable increments untill the end of records. I placed the initialize formula in the group header but it is not working.
I have used the whileprintingrecords, it is not working either. I have tried different evaluation time but not working.
I am not clear on which different passes the formulas are calculated. So any help will be appreciated. Thanks.
Formula to calculate active employees, placed in group footer{
global numbervar DeptAcEmp;
if StrCmp ({tempTurnOver.empStatus},"A" ) = 0 then
DeptAcEmp := DeptAcEmp + 1;
DeptAcEmp;}
Formula to initialize variables, placed in group header{
global numbervar DeptAcEmp := 0;
global numbervar DeptTermEmp := 0;
}
Please see the sample output below. Thanks.
>First Group<
075904 Marketing/Hourly << Header >>
075904 10494 Gerhard Richard A
075904 10502 Braden Richard A
075904 10506 Bratek Adam A
075904 10507 Darnley Scott A
075904 10513 Mennucci Eli T
075904 10519 Gibson Gillis T
075904 6 Number of A's is 4.00 << Footer>>
Number of T's is 2.00
>2nd Group<
075905 Director Of Marketing Salaried << Header >>
075905 10448 Jay Stephen A
075905 1 Number of A's is 5.00 << Footer>>
Number of T'is 2.00
I have used the whileprintingrecords, it is not working either. I have tried different evaluation time but not working.
I am not clear on which different passes the formulas are calculated. So any help will be appreciated. Thanks.
Formula to calculate active employees, placed in group footer{
global numbervar DeptAcEmp;
if StrCmp ({tempTurnOver.empStatus},"A" ) = 0 then
DeptAcEmp := DeptAcEmp + 1;
DeptAcEmp;}
Formula to initialize variables, placed in group header{
global numbervar DeptAcEmp := 0;
global numbervar DeptTermEmp := 0;
}
Please see the sample output below. Thanks.
>First Group<
075904 Marketing/Hourly << Header >>
075904 10494 Gerhard Richard A
075904 10502 Braden Richard A
075904 10506 Bratek Adam A
075904 10507 Darnley Scott A
075904 10513 Mennucci Eli T
075904 10519 Gibson Gillis T
075904 6 Number of A's is 4.00 << Footer>>
Number of T's is 2.00
>2nd Group<
075905 Director Of Marketing Salaried << Header >>
075905 10448 Jay Stephen A
075905 1 Number of A's is 5.00 << Footer>>
Number of T'is 2.00