Getting Payments already made in statement report.

Hi Experts,
I have created a table Called Benefit Payment. The form for keying in this payment is in the employee button on the employee Card. I keyed in two payments for two different employees with their dates. I am using Nav. Version W1 4.0 (4.0)

I try to capture these payments to be part of a report called employee Statement, so that it can display Date and Amount that have been keyed in for each employee.

This is my Code:
Under the OnAfterGetRecord,

“Benefit Payment”.SETRANGE(“Employee No.”, Empid);
IF “Benefit Payment”.FIND(’-’)
Amounts := “Benefit Payment”.Amounts;

My problem now is when i run a report by previewing the report for a statement for an employee for a particular date range, the report prints only the first payment and the report keeps generating without stopping with only the first payment information unless i press esc. then it will stop.

i was experting it to show me the two payments made in this form.
Date Amount
02/03/07 111
09/07/07 100

When one payment is keyed in, It shows me that results correctly. That is the payment made is shown and the report generation does not continue. It stops.

In a nutshell for one entry, it comes out correct, but two or more entries brings the problem.

can anybody tell me what is wrong with my code or give me a better Code to do this perfectly. [8-)]