Group Calc Timing
I am having difficulty with a simple report with 3 levels of grouping,
populated by an Interbase Query, hooked up to a DB pipeline.
Group totals are fine, simply using a DBCalc, but I need to show what
percentage of the total each record represents. I have a ppVariable which
does the calculation in an OnCalc event, but the percentage only calculates
on a cummulative basis, so the first record is always 100%. I am using two
pass, with look ahead on the DBCalc SUM field.
Delphi 5 RB 5.6 Interbase 6
Any ideas?
Will
populated by an Interbase Query, hooked up to a DB pipeline.
Group totals are fine, simply using a DBCalc, but I need to show what
percentage of the total each record represents. I have a ppVariable which
does the calculation in an OnCalc event, but the percentage only calculates
on a cummulative basis, so the first record is always 100%. I am using two
pass, with look ahead on the DBCalc SUM field.
Delphi 5 RB 5.6 Interbase 6
Any ideas?
Will
This discussion has been closed.
Comments
second pass, calculate the percentages by pulling the total value from the
list. There are two boolean properties which will help you determine when
to perform the calculations in the OnCalc event handler code:
Report.FirstPass and Report.SecondPass.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com