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.
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.