Hard headed for OnCalc?
Hi, i don't know what am i doing wrong but:
Have a footer group and summary variables. All i want to do is SUM the
multiplication of some fields.
So the variable in the group footer has:
CalcType: veTraversal
ResetComponent: ppGroup1
ResetType:veGroupStart
The OnCalc: Value:= Value +
MyPipeLine.GetFieldAsDouble('field1')*MyPipeLine.GetFieldAsDouble('field2');
The summary variable has:
CalcType: veTraversal
ResetType:veReportEnd
The OnCalc: Value:= Value +
MyPipeLine.GetFieldAsDouble('field1')*MyPipeLine.GetFieldAsDouble('field2');
I have only one group in the report but the summary values are slightly
higher than the footer group band ones. They should be exactly equal!
What's wrong?
--
Guillermo Castaño Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
GuillermoC@GrupoMillennium.com
www.GrupoMillennium.com
Have a footer group and summary variables. All i want to do is SUM the
multiplication of some fields.
So the variable in the group footer has:
CalcType: veTraversal
ResetComponent: ppGroup1
ResetType:veGroupStart
The OnCalc: Value:= Value +
MyPipeLine.GetFieldAsDouble('field1')*MyPipeLine.GetFieldAsDouble('field2');
The summary variable has:
CalcType: veTraversal
ResetType:veReportEnd
The OnCalc: Value:= Value +
MyPipeLine.GetFieldAsDouble('field1')*MyPipeLine.GetFieldAsDouble('field2');
I have only one group in the report but the summary values are slightly
higher than the footer group band ones. They should be exactly equal!
What's wrong?
--
Guillermo Castaño Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
GuillermoC@GrupoMillennium.com
www.GrupoMillennium.com
This discussion has been closed.
Comments
instead of on group start. It should start working with that setting.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
between group end and group start?
thanks
If i export the report to excel and check the values, both are wrong.
The situation:
Have fields A, B and C.
I need two totals in the group footer and in the report summary. Each total must
be:
Total1: SUM(A*B*C)
Total2: SUM(A*C)
I already tried to calculate them in two ways:
1. Having a variable in the footer, calc ontraversal, reset ongroupend.
Value := Value +
(Pipeline.GetFieldAsDouble('A')*Pipeline.GetFieldAsDouble('B')*Pipeline.GetFieldAsDouble('C'));
The value calculated is wrong.
2. Another approach, invisible variables in the detail of the reports. One
calculating A*B*C the other A*C. The values calculated in the detail are OK,
but... in the same OnCalc i'm calculating the total doing:
VariableInTheFooter.Value := VariableInTheFooter.Value + Value;
The value obtained is the same wrong value that in approach 1.
Please, help me... i need to deploy the report and can't make it work.
thanks
example and I'll look at it to see what's happening. I have an example
which is working as I expect it. I added the values manually and they were
correct and I also created a calc field on the dataset and it came up with
the same number as well.
Perhaps, it may be easier to create calculated fields in the dataset for the
(A*B) and (A*B*C) calculations, for each record. Then use DBCalcs to sum
their values.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
newsgroup:)
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
report to see what the problem is. Can you create a simple one for us that
shows the error- this would be the fastest way for us to get the report
working for you.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
OnCalcs, dataset and pipelines.
Is that enough? Send it via mail?
thanks for your help
send you an example with the DBDemos database ASAP.
bye
as expected, calculations are perfect!!
Don't know what can be wrong, the dbdemos test i made has the same logic and
calculation than the real wrong application.
thanks