How do I calculate the percentage of a Sum in ReportBuilder?
Hello all,
Here is a question posted at borland.public.delphi.reporting-charting with
no answer. Hopefully someone can answer here...
I have a group in a report and wish to calculate for each record the
percentage of a calcualted total. eg,
Group 1 Product Name Amount Sold %
Cola
Coca Cola 12
Pepsi 6
Total 18
The total is Sum(Amount_Sold) but is calculated whilst the records
traverse meaning the first record will be 100% because it has not yet
taken into account the second record. Anyone have any ideas?
thanks in advance
tom
Here is a question posted at borland.public.delphi.reporting-charting with
no answer. Hopefully someone can answer here...
I have a group in a report and wish to calculate for each record the
percentage of a calcualted total. eg,
Group 1 Product Name Amount Sold %
Cola
Coca Cola 12
Pepsi 6
Total 18
The total is Sum(Amount_Sold) but is calculated whilst the records
traverse meaning the first record will be 100% because it has not yet
taken into account the second record. Anyone have any ideas?
thanks in advance
tom
This discussion has been closed.
Comments
You can do so using a two pass report and TppVariables with the lookahead
property set to true. Below is an example that should get you on the right
track. If you need an example in RAP, let me know.
http://www.digital-metaphors.com/tips/UseLookAheadValueInCalc.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com