I believe your problem is that the header is processed before it has looked at the data, thus the sum will always be 0. I would usally make a user defined function to calculate this value if it is needed prior to the footer section of the report.
Bob
'If the people lead, the leaders will follow'
'War does not determine who is RIGHT, just who is LEFT'