ppVariable calculations behavior changed from RB7 > RB10
Hi,
Simple report
Detailband:
-TppVariable ppDummyVar Calculate On: Traversal Reset
On:ReportEnd
ppDummyVar.OnCalc:
ppSumField1Var.Value := ppSumField1Var.Value +
DetailBandPipeLine.GetFieldValue('Field1');
ppSumField2Var.Value := ppSumField2Var.Value +
DetailBandPipeLine.GetFieldValue('Field2');
Summaryband:
-TppVariable ppSumField1Var Calculate On: Traversal Reset
On:ReportEnd
-TppVariable ppSumField2Var Calculate On: Traversal Reset
On:ReportEnd
RB7: Correct tortals
RB10 Wrong totals: the first traversed record gets added twice!!!!!!!
We have 100+ reports doing this type of calculations
What's going on?
Filip Moons
Simple report
Detailband:
-TppVariable ppDummyVar Calculate On: Traversal Reset
On:ReportEnd
ppDummyVar.OnCalc:
ppSumField1Var.Value := ppSumField1Var.Value +
DetailBandPipeLine.GetFieldValue('Field1');
ppSumField2Var.Value := ppSumField2Var.Value +
DetailBandPipeLine.GetFieldValue('Field2');
Summaryband:
-TppVariable ppSumField1Var Calculate On: Traversal Reset
On:ReportEnd
-TppVariable ppSumField2Var Calculate On: Traversal Reset
On:ReportEnd
RB7: Correct tortals
RB10 Wrong totals: the first traversed record gets added twice!!!!!!!
We have 100+ reports doing this type of calculations
What's going on?
Filip Moons
This discussion has been closed.
Comments
My guess is that the ppDummyVar.DataType is set to dtString. Try modifying
the DataType to be a numeric type such as dtInteger, dtDouble and then
re-test.
When set to dtString, the Variable.OnCalc will fire more frequently. This is
necessary to fix bugs reported by customers using the Variable to print
strings. When set to dtString, the Variable cannot cache intermediate
results, we had customers with complex subreport and KeepWithTogether cases
in which the simple String Variables showed the wrong value.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thank you Nico