0
votes

I need to use the total of my running total in group 1 in the formula group 2 to calcalute the percentage.

Formula 1 (in my header):

whileprintingrecords; shared numbervar RunA; RunA:=0

Formula 2 (in my details):

whileprintingrecords;
shared numbervar RunA;
RunA:= RunA + {@usdequiv}

Formula 3 (in my footer):

whileprintingrecords; shared numbervar RunA; RunA

Results when printing:

Group2             Amount         Percentage
Bank 1             1000.00         7.14%  (1000/14000)
Bank 2             2000.00        14.28%  (2000/14000)
Bank 3             4000.00        28.57%  (4000/14000)
Bank 4             7000.00        50.00%  (7000/14000)
Group1 TOTAL       14000.00

I need to calculate the Percentage amounts, which I've added above, but can't get the total (formula 3) into my calculations. It just keeps on reading the running total.

My amount field I could not do a summary on so had to create the running total.

1

1 Answers

0
votes

I had the same problem. Managed to change the SQL that feeds the report and then used a formula to do what I want. In your case, the formula could be something like this:

count({details},{group2})

...and then use it on group2 header.