>Thanks Mr. Hilmar.
>So fast response from you! I was trying to edit the thread as after posting it was not giving the accurate picture - my browser could not load the message to edit and i got message that I have already got a reply! Thanks.
That is right; you can only edit a message if nobody has replied yet.
>Now, about the problem:
>I am novice to programming as well to VFP. I could not understand how to use cursor & loops. Yes, I have already tried it by using "RECEIPTS" data from one cursor and "PAYMENTS" data from another cursor, but could not get proper results.
>
>I appreciate if you please explain it in some detail.
>
>Thanks a lot.
>Best regards.
Let me try some sample code. The following is untested.
local lyAmount
create cursor TempReport (Receipts(Y), Payments(Y))
append from Receipts
select TempReport
go top
select Payments
scan
lyAmount = Payment
select TempReport
skip
if eof()
append blank
endif
replace Payment with lyAmount
endscan
If you don't need all the data from the "Receipts" table, add "for (some condition)" to the APPEND FROM command.
If you don't need all the data from the"Payment" table, add "for (some condition)" to the SCAN command.
HTH,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)