Try placing a TppVariable inside the footer band of the report set to calculate on traversal and another TppVariable inside the header band. Inside the first variable's OnCalc event, calculate the running total and assign its value to the variable in the header. Take a look at the following example I created that does this.
Hi, Nico, I use the same method in my report but the header variable always sum the first data amount in every page( even in the first page). Is there any other setting I have to take care
Vincent ps. I am using Report builder 10.02 in delphi 2006
Please send all attachments to support@digital-metaphors.com.
Due to the timing in which variables are calculated, it seems the next record is being added to the value of the variable. You can try to subtract this value from the header variable's value.
Value := Value + ppReport1.DataPipeline['AmountPaid']; ppVariable1.Value := Value - ppReport1.DataPipeline['AmountPaid'];
Comments
Try placing a TppVariable inside the footer band of the report set to
calculate on traversal and another TppVariable inside the header band.
Inside the first variable's OnCalc event, calculate the running total and
assign its value to the variable in the header. Take a look at the
following example I created that does this.
http://www.digital-metaphors.com/tips/RunningTotalInHeader.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I use the same method in my report but the header variable always
sum the first data amount in every page( even in the first page).
Is there any other setting I have to take care
Vincent
ps. I am using Report builder 10.02 in delphi 2006
Please send all attachments to support@digital-metaphors.com.
Due to the timing in which variables are calculated, it seems the next
record is being added to the value of the variable. You can try to subtract
this value from the header variable's value.
Value := Value + ppReport1.DataPipeline['AmountPaid'];
ppVariable1.Value := Value - ppReport1.DataPipeline['AmountPaid'];
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com