may help you...
Create a formula field TOTAL1 and edit this code:
WhilePrintingRecords;
NumberVar total;
total := 0;
Place TOTAL1 in page header section.
Create a formula field TOTAL2 and edit this code:
WhilePrintingRecords;
NumberVar total;
total := total + {field01};
where field01 is the field to summarize.
Place TOTAL2 in details section.
Create a formula field TOTAL3 and edit this code:
WhilePrintingRecords;
NumberVar total;
Place TOTAL3 in page footer.