$ 0 0 Try: Whileprintingrecords; numbervar cnt; numbervar cnt2; if {@BO} =1 then (cnt :=cnt+1; cnt2 := cnt2+1); -Abhilash