Calculation
Already posted but don't know if it was seen:
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
--
Guillermo Castaño Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
GuillermoC@GrupoMillennium.com
www.GrupoMillennium.com
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
--
Guillermo Castaño Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
GuillermoC@GrupoMillennium.com
www.GrupoMillennium.com
This discussion has been closed.
Comments
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
be easy. To do that, in the Data tab add a calculated field to the dataset,
choose 'Expression' under 'Function' and for the expression enter something
like:
(tbl.Field1*tbl.Field2) / (tbl.Field1*tbl.Field2*tbl.Field3)
Change the calc'd field's alias to 'DetVariable' and FootVar and SumVar
should work as-is.
Not sure about what SUM(Field1*Field2*Field3) is supposed to do though..