how to calculate this ?
Hi,
I put two DBCalc(say SalesSum and QtySum, summs) in GroupHeader. Now I want
put a variable AverageSales in the same groupheader which would be just
SalesSum divided by QtySum.
I've tried to use GroupHeaderBand.onBeforePrint and
GroupHeaderBand.onBeforeGenerate events to calculate this variable but it
did not work in proper way.
How can I do that ?
Cheers,
Dmitry
I put two DBCalc(say SalesSum and QtySum, summs) in GroupHeader. Now I want
put a variable AverageSales in the same groupheader which would be just
SalesSum divided by QtySum.
I've tried to use GroupHeaderBand.onBeforePrint and
GroupHeaderBand.onBeforeGenerate events to calculate this variable but it
did not work in proper way.
How can I do that ?
Cheers,
Dmitry
This discussion has been closed.
Comments
How to force components within groupheader to be calculated in certain order
?
You need to use a TppVariable component to make this calculation. You can
set the value of the TppVariable inside the TppVariable.OnCalc event.
Something like the following...
procedure TForm1.ppVariable1Calc(Sender: TObject; var Value: Variant);
begin
Value := ppDBCalc1.Value / ppDBCalc2.Value;
end;
Note: Be sure the Variable is set to the proper type.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
ReportBuilder makes calculations based on teh z-order of the components on
the report. You can change this order by using the Send to Back and Bring
to Front features for each component. (Right click popup memu option).
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com