The problem is you don't know how many days have been paid.
To do this will require
1. A redesign so the payments for each rental are gouped together - group by invoice rather than by date of payment
2. Use some fancy arrays and variales to track the current paid through date.
The first is obviously easier to do and maintain. It also doesn't have a problem with memory or array sizes.
Also by grouping by invoice it will be easier to see at a glance how far along the payment has gone and when the rental period is over.
mlmcc
Matthew2624
ASKER
Unfortunately for Statutory reasons the report has to be by Payment. I probably should have mentioned that this report is actually a sub-report of a rental Statement. This is the payments section.
There is specific section in the report which will only include Payment Type transactions, it links to the main report via an account number and a payment reference number.
The sub-report should show all Payments of rent and then only the invoice allocations if there is an allocation. I have attached a pdf of the report to show where there is a blank and a 0 as the last field in the row. CRM-Tenant-Statement-2-Milestone.pdf CRM-Tenant-Statement-2-Milestone.rpt
To do this will require
1. A redesign so the payments for each rental are gouped together - group by invoice rather than by date of payment
2. Use some fancy arrays and variales to track the current paid through date.
The first is obviously easier to do and maintain. It also doesn't have a problem with memory or array sizes.
Also by grouping by invoice it will be easier to see at a glance how far along the payment has gone and when the rental period is over.
mlmcc