Click to See Complete Forum and Search --> : Forumla Filtering


ltt19
June 11th, 2009, 11:40 PM
Hi,

I need to, based on a condition, sum all the values of the field in the report.

I've created the fallowing formula:

WhileReadingRecords;
NumberVar somavalor;
If {movimentos.custoreceita} = 'Variavel'
Then somavalor := somavalor + {movimentos.valorpago};
somavalor;

However, it displays the sum record by record, for instance, the row A displays A, row B displays A + B, and so on. The total amount is only displayed on the last row of the last page.

How can I fix this? I Want the same value on all rows, being the value the sum of everything.

I'm new to CR, and I was unable to find anything similar on the internet.

Any help would be very appreciated.
Thanks in advance.

jawadhashmi
June 15th, 2009, 06:33 AM
If you want to see the total means the total of all the fields with each row. You can calculate it in some other subreport and show it with each row.