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

Calculating running percentages

edited September 2002 in General
I have a report that lists the primary languages of a population along with
the count for each and subtotals for the two population groups. My problem
is that I can't figure out how to display percentages for each language
based on the sub totals of the poplulation. I want the report to do the
following:

APop Count % of AGroup % of Total Pop
AMHARIC 1 7.7 3.3
CHINESE 3 23.1 10.0
ENGLISH 9 69.2 30.0

SubTotal APop 13
BPop Count % of BGroup % of Total Pop
ARABIC 1 5.88 3.3
CHINESE 5 29.4 16.7
ENGLISH 7 41.2 23.3
HINDI 4 23.3 13.3

SubTotal BPop 17

Total Pop 30

I have created two TppVariable components and set the formula on the OnCalc
event. I have played with numerous timming combinations but I either get the
same value for all languages or divid by zero errors because I'm accessing
the group subtotal to soon. The report is set at TwoPass and the variables
are set for LookAhead. Any help would be great.


Environment: Delphi 6, update 2
Reportbuilder pro 6

Comments

This discussion has been closed.