Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Perform a summary calculation based on group calculations

Hi,

D7 + RB 11.07
TppReport with a group. In the group footer, there is a TppDBCalc that calculates an average of some DB field from the detail band. This works fine. Each group footer displays the group average correctly.
Now, in the report summary, I'd like to calculate a total average, but based not on single records, but on group averages. I.e. in case of 3 groups: (Group1avg + Group2avg + Group3avg) / 3.
I tried different approaches with TppVariables, and I face a problem that when in OnCalc event I access the group footer TppDBCalc.Value - it is the group sum, not the group average. I know this is because the average calculation is not completed yet.
How do I do such simple task? Any help will be appreciated.

Comments

  • As a workaround I've found that if you copy the values from the DBCalcs into a variable in the group footer band, you can then use the values of that variable in the summary. DM will probably have a better way though :-)
Sign In or Register to comment.