Count of Previous Records

I am trying to capture the following in my report which displays records that are overdue per month:

  1. Records where Close Date is null.
  2. Records where the Close Date > Due Date.

The month that displays in the report is based off of the month of the Due Date. For example, if there are records in the database that have a Due Date in Feb, March and April, those three months would show up on the report.

The part I need help on is capturing the count of records from previous month(s) that meet the criterion above and showing it for the month.

For example, I have months Feb, Mar and April. When I run the report in April, I should have a count for April that displays records that meet the criterion above AND for previous months, Feb and March that meet the criterion as well but the Close Date <April.

For a specific example:

I have Record #1 that has a Due Date in Feb and Close Date in April. This record should show up in Feb and March (since it was not closed until April) but not show up in April (since it was closed in April). Any suggestions on how to do this?

Note - report needs to show all overdue at runtime. For example, if I run this report in Nov 2010 and there are overdue records in Jan 2010, then those need to display on the report.

Thanks in advance for your help.


friendofbobforum (BOB member since 2010-04-30)