Value of DBCalc in Footerband is wrong
I am using RB 5.55 Ent and I have a problem with a page subtotal calculated
by a DBCalc on the prize field printed in the Detailband.
The Detailband is dynamic, with a group to manage the keep together stuff.
So each position is printed on one page.
Sometimes the last position is shifted to the next page (because of keep
together) which normally would have started to print on the current page
(without keep together).
So the problem is, that the subtotal is sometimes to high.
The position shifted to the next page is sometimes (very often) added to the
sum.
I checked out a lot of different settings including using regions for keep
together functionality and I used RAP as well.
Please help me with a work around or something.
I am using Delphi 5 with TppBDEPipelines on Paradox Tables.
Thanx
Matthias Veit
by a DBCalc on the prize field printed in the Detailband.
The Detailband is dynamic, with a group to manage the keep together stuff.
So each position is printed on one page.
Sometimes the last position is shifted to the next page (because of keep
together) which normally would have started to print on the current page
(without keep together).
So the problem is, that the subtotal is sometimes to high.
The position shifted to the next page is sometimes (very often) added to the
sum.
I checked out a lot of different settings including using regions for keep
together functionality and I used RAP as well.
Please help me with a work around or something.
I am using Delphi 5 with TppBDEPipelines on Paradox Tables.
Thanx
Matthias Veit
This discussion has been closed.
Comments
I checked this behaviour once more and I found out, that this behaviour with
a wrong sum is only if I have a region for the whole Detailband and Keep
together is set to true and no group. With a group and keep together it
seems to work fine.
But if I put a TppDBCalc in the Headerband the carry over is not correct.
The first position is added to the sum.
Please have a look at this.
I made a sample project (exe) with DBDEMOS. If you want to have it I can
mail it.
Best regards
Matthias Veit
project (with source) to support@digital-metaphors.com and we'll try it out.
The upgrade to 5.56 is free from 5.55.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
we have the same problem!!!
We are using RBuilder 5.56 and Delphi5.
In Version 4.22 all works fine!
So, what has changed?
Klaus
I have exactly the same problem with TppVariable in 5.56. But, I think the
real problem is not with the TppVariable.
I have a subreport and use TppVariable in the master to calculate the sum af
all the details in the subreport. Set its CalcType as
veDataPipelineTraversal and DataPipeline is the pipeline of the subreport.
KeepTogether of the subreport is set to false. There is a summary band in
the child report and the master has a group. My TppVariable is at the footer
of that group in the master.
Whenever the subreport passes thru the next page one record in the
DataPipeline is traversed two times. I think this is a serious bug since the
veDataPipelineTraversal doesn't work as it should be.
Regards,
Yakup Gezdirici
generate on the page since the band has to generate so that it can determine
if it will fit on the page. When the band doesn't fit, then the dbCalc has
the value for the next record included. So, when the first page ends, it
updates the dbCalc value in the header with the incorrect value. This is a
problem.
To workaround it, you can take control of the draw commands yourself to
simulate a dbCalc in the header. Calculate a running total in a variable in
the detail band. Place a label in the header instead of a dbCalc. Assign
the label's OnDrawCommandCreate event to store a handle to the drawcommand
object that is passed in that event. Then in the Report.OnEndPage event,
update the TppDrawText command Text property to show the calculated
variable's value.
We'll continue researching 'uncalc'ing the dbCalc when the band has to
generate but doesn't fit on the page.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com