Base de Conocimientos Técnicos

REPORTS: To get %amount of SUM(amount) on the detail line

Hint Ref: 020601101726
Hint Date: 10/01/2006

Hint Details:

1. Sum the column in the normal way by placing a DBCalc field in the Footer or Summary (say DBCalc1 is the total of 'amount' from the 'main' pipeline).

2. Right click on DBCalc1 and tick 'LookAhead' on the menu.

3. On the detail line, place a variable field (say Variable1) and set it as a Double.

4. go to the 'Calc' tab and locate Variable1

5. create a procedure for 'OnPrint'

6. place the following in the procedure and compile:

Variable1.value := main['amount'] / DBCalc1.GetLookAheadValue( DBCalc1.GetLookAheadKey) *100;