Calculation question...
Hi, here i go again with calculation questions:
I have something like this:
Detail band:
Field1 Field2 Field3 DetVariable
Group footer:
FootVariable
Summary:
SumVariable
An need this odd calculation:
DetVariable = (Field1*Field2) / SUM(Field1*Field2*Field3)
FootVariable = SUM(DetVariable) for the group
SumVariable=SUM(DetVariable) for the report
Is there a way to acomplish that?
thanks
--
Guillermo Castaño Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
GuillermoC@GrupoMillennium.com
www.GrupoMillennium.com
I have something like this:
Detail band:
Field1 Field2 Field3 DetVariable
Group footer:
FootVariable
Summary:
SumVariable
An need this odd calculation:
DetVariable = (Field1*Field2) / SUM(Field1*Field2*Field3)
FootVariable = SUM(DetVariable) for the group
SumVariable=SUM(DetVariable) for the report
Is there a way to acomplish that?
thanks
--
Guillermo Castaño Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
GuillermoC@GrupoMillennium.com
www.GrupoMillennium.com
This discussion has been closed.
Comments
Hi, here i go again with calculation questions:
I have something like this:
Detail band:
Field1 Field2 Field3 DetVariable
Group footer:
FootVariable
Summary:
SumVariable
An need this odd calculation:
DetVariable = (Field1*Field2) / SUM(Field1*Field2*Field3) .... SUM
for the group
FootVariable = SUM(DetVariable) for the group
SumVariable=SUM(DetVariable) for the report
Is there a way to acomplish that?
thanks
at least on in the detail band, one in the group footer, and one in the page
footer. Use their OnCalc events to create the sums. The variable component
can be set to reset when a group ends/starts. See the Timing dialog to
control this by right clikcing over the variable in the designer.
Variables can be set to Visible = False and they will still calculate their
OnCalc event. You can control the order in which their OnCalcs fire through
their CalcOrder property. This will ensure that you can calculate the
numerator and denominator before your main OnCalc calculation fires.
Access the datapipeline field values directly for the calculations:
Value := plOrders['Amount Paid'] * plOrders['Amount Paid'];
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com