You can place TppVariables in the page footer band that sum the values for the current page's detail bands. There is a timing dialog available by right clicking over the variable in the designer. This will allow you to control the timing that the variable's OnCalc event it triggered for your variable and when it gets reset to zero.
If you would like to have a summary band under the detail bands for a page, then create a group and its group footer band.
True, but if the last detail record on a page has not enough space and is printed on the next page, the sum in the footer band includes already the value of this record. This happens in one and twopass reports.
Is there any possibility to avoid this and print the accurate sum?
Carsten, this is a current limitation of the report engine and a dynamic height detail band. The OnCalc fires in the footerband before the engine has determined that the detailband can or cannot fit on the page. If it doesn't fit, then the variable in the footerband, has no current way of reverting back to its previous value.
What you can do is use a KeepTogether Region in the detail band. Place an invisible variable in the detail band. In the Detailband.Afterprint event assign the value from the datapipeline directly to the variable value. When the region doesn't fit, then the region will create a cache manager behind the scenes and restore the variable's value before the DetailBand.AfterPrint fires. This will give you the accurate value in the variable in the detailband, in which you can assign to the footerband's variable in the DetailBand.AfterPrint event.
Comments
the current page's detail bands. There is a timing dialog available by
right clicking over the variable in the designer. This will allow you to
control the timing that the variable's OnCalc event it triggered for your
variable and when it gets reset to zero.
If you would like to have a summary band under the detail bands for a page,
then create a group and its group footer band.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
True, but if the last detail record on a page has not enough space and is
printed on the next page, the sum in the footer band includes already the
value of this record.
This happens in one and twopass reports.
Is there any possibility to avoid this and print the accurate sum?
Thanks
Carsten Wefel
height detail band. The OnCalc fires in the footerband before the engine
has determined that the detailband can or cannot fit on the page. If it
doesn't fit, then the variable in the footerband, has no current way of
reverting back to its previous value.
What you can do is use a KeepTogether Region in the detail band. Place an
invisible variable in the detail band. In the Detailband.Afterprint event
assign the value from the datapipeline directly to the variable value. When
the region doesn't fit, then the region will create a cache manager behind
the scenes and restore the variable's value before the DetailBand.AfterPrint
fires. This will give you the accurate value in the variable in the
detailband, in which you can assign to the footerband's variable in the
DetailBand.AfterPrint event.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com