Use date ranges in report formulas

In Practice CS, you can use dates in report formulas to control the date range a field calculates. This is commonly used in reports with agings, beginning or ending balances, or date-separated columns.
You can use dates in Practice CS report formulas to control the date range that a field calculates.
This is commonly used in reports with agings, such as the A/R Summary and WIP Summary, or reports with beginning and ending balances.
You can also find these formulas in reports that separate columns by date, such as the Three Year Billing Analysis in the Practice CS Library.

Example 1: Beginning A/R Balance

[AR Aging(Key(Client), Minimum Date, Add Days(Detail Line Date From(1), -1))]
This formula returns the Client A/R Aging from the beginning of time (1/1/1900) to the day before the Detail Line 1 From date. Here is a breakdown of the formula:
  • AR Aging(Key(Client),
    — Client A/R Aging between
  • Minimum Date
    — the beginning of time (1/1/1900)
  • Add Days(Detail Line Date From(1), -1)
    — and the day before the Detail Line 1 From date
You can replace Minimum Date and Add Days(Detail Line Date From(1), -1) with other dates. The 1st date is the oldest date you want, and the 2nd date is the most recent date you want.

Example 2: Current A/R Balance

To update the previous formula from Beginning Balance to the current period balance, use the following formula:
[AR Aging(Key(Client), Detail Line Period Start(1, 0), Detail Line Date To(1))]
This formula returns the Client A/R Aging between the period start date from Detail Line 1 and the Detail Line 1 Date To. Here is a breakdown of the formula:
  • AR Aging(Key(Client),
    — Client A/R Aging between
  • Detail Line Period Start(1, 0)
    — the period start date from Detail Line 1
  • Detail Line Date To(1)
    — and the date from Detail Line 1 Date To
important
  • Adding a date range to a formula doesn’t guarantee the data will appear for that date range. The report Detail Line must also include the full date range that covers all formulas on the report. An exception is reports that can show aging balances, such as the Work in Process Summary or Accounts Receivable Summary.
  • When customizing date ranges in a formula, keep the date sources consistent. If the report is based primarily on the Detail Line 1 date range, avoid using dates from the Report Date or Detail Line 2. Base the report consistently on Detail Line 1 or the Report Date, and avoid using the Detail Line 2 date range.