New DBCalc as DBText descendant
Hi all,
I'm writing my own tppdbcalc component for calculation like countdistinct. I
derives it from tppdbtext en override the GetTheText and Compute method. But
in my report with this component on a summary band, with a dataset with 24
records, the compute is called more then 24 times. Is ther an event or
method that is called every time e new record is taken from the dataset.
Best regards
Jos Aikema
I'm writing my own tppdbcalc component for calculation like countdistinct. I
derives it from tppdbtext en override the GetTheText and Compute method. But
in my report with this component on a summary band, with a dataset with 24
records, the compute is called more then 24 times. Is ther an event or
method that is called every time e new record is taken from the dataset.
Best regards
Jos Aikema
This discussion has been closed.
Comments
referenced. This fires often and more than once per record. Try overriding
the Compute method and store the computation in the value property.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I only have override the GetText for some other things. U use the Compute
method for my counting and i seems to offer more then once per record. What
am I doing wrong??
Jos Aikema
multiple times. If you store the value in DBCalc.Value, then the cache
manager will restore the value to the previous one automatically so that
when it fires a second time, it will calculate correctly. If you store the
value in another field, then it won't work correctly.
The report engine has to try generating a band to see if it will fit on a
page. If it fails to fit on a page, it must back up and restore the calc
component values. Then it regenerates the band again on the next page,
firing the calcs and other events again for the same record.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com