while I can not use DBCalc.Value to get the result from the Sum
Hi,
I have a report like this
GroupHeader
Detail
Field1 Field2
(Field1 - Field2) (Field1 - Field2)/Field1
GroupFooter
Sum(Field1) Sum(Field2)
Sum(Field1) - Sum(Field2) (Sum(Field1) - Sum(Field2))/Sum(Field1)
I can use two DBCalc - ppDBCalc1 and ppDBCalc2 to calc the Sum(Field1) and
Sum(Field2), but I can not just use a ppVariant and set ppVariant1.Value :=
(ppDBCalc1.Value - ppDBCalc2.Value)/ ppDBCalc1.Value to get the correct
result of (Sum(Field1) - Sum(Field2))/Sum(Field1). I find the ppDBCalc1 and
ppDBCalc will be reset to zero in some time and I can not make use of their
value. But I do want to use the Value of them. I have read the developer
guide about 'Conditional Group Total' & 'Conditional Grand Total'. I know I
can get the result I want if I use ppVariables to replace all ppDBCalc
component. But for my customer, why ask them to write so many RAP code in
the Calc tab. Could anyone explain how can I get the DBCalc value to do
what I want?
Many thanks!
Tao
I have a report like this
GroupHeader
Detail
Field1 Field2
(Field1 - Field2) (Field1 - Field2)/Field1
GroupFooter
Sum(Field1) Sum(Field2)
Sum(Field1) - Sum(Field2) (Sum(Field1) - Sum(Field2))/Sum(Field1)
I can use two DBCalc - ppDBCalc1 and ppDBCalc2 to calc the Sum(Field1) and
Sum(Field2), but I can not just use a ppVariant and set ppVariant1.Value :=
(ppDBCalc1.Value - ppDBCalc2.Value)/ ppDBCalc1.Value to get the correct
result of (Sum(Field1) - Sum(Field2))/Sum(Field1). I find the ppDBCalc1 and
ppDBCalc will be reset to zero in some time and I can not make use of their
value. But I do want to use the Value of them. I have read the developer
guide about 'Conditional Group Total' & 'Conditional Grand Total'. I know I
can get the result I want if I use ppVariables to replace all ppDBCalc
component. But for my customer, why ask them to write so many RAP code in
the Calc tab. Could anyone explain how can I get the DBCalc value to do
what I want?
Many thanks!
Tao
This discussion has been closed.
Comments
printing its group footer. You'll need to use a TppVariable to make you
report work. You also may be able to create your own DBCalc component for
your users, which would reset when a group starts printing, and not when it
ends.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
printing instand of finishing. Or give a property control for the end-user
to control the reset timing. Is this possible in the next RB version?
Thanks
Tao