I can't troubleshoot this easily without seeing the actual report saved with data.
You do not need a running total and it will only complicate matters. First make a formula {@null} by creating a new formula and then saving it without entering anything. Then create a second formula:
//{@cntreedtype}:
if {EMPLOYEE_DAY.REED_TYPE}=4 then 1 else
tonumber({@null})
You can either insert a sum (not count) on this formula at the group level, or you can create a formula:
sum({@cntreedtype},{Employee.REEM_Code})
Some pointers:
In the employee group footer, you should have two formulas for use in the chart:
//{@onchangeof}:
whileprintingrecords;
shared stringvar onchgof;
shared stringvar onchgof := onchgof + totext({Employee.REEM_Code},0,"")+ "^";
//{@showvalue}:
shared numbervar empl_work_days;
shared numbervar empl_work_hours := empl_work_days*{EMPLOYEE.REEM_AVAILABLE_HOURS};
shared stringvar showval;
showval := showval + totext(empl_work_hours,2,"") + "^"; //2 for 2 decimals or 0 for none; "" for no comma
The chart must be in its own subreport in the report footer (Add the employee table as the datasource). The sub should be linked on the main report formula {@onchangeof} and the selection formula within the sub should be:
totext({Employee.REEM_Code},0,"") in split({?Pm-@onchgof},"^")
Insert a group on {Employee.REEM_Code}.
Next create a formula within the sub:
//{@showval:
whileprintingrecords;
shared stringvar showval;
tonumber(split(showval,"^")[groupnumber]);
Insert the chart in the subreport report footer.
Add {Employee.REEM_Code} to the "on change of" box.
Add {@showval} to the show value box.
Do not leave the chart expert before finishing this. There is a trick to this, as formulas in the report list of the chart expert will disappear after the report is run, if I remember correctly.
If you need more assistance with this, please send the report saved with data.
-LB