You can create date-driven reports easily in Crystal Reports. Crystal Reports supports numerous date range functions. Among these are MonthToDate and YearToDate. MonthToDate specifies a range of date values that includes all dates from the first day of the month to today. Consider this example:


if {Gift.Gift Date} in MonthToDate then {Gift.Gift Amount}

The formula returns the gift amount if the date falls on any date from the first day of the month to today.

YearToDate, in the same context, specifies a range of date values that includes all days from the first day of the calendar year to today. Consider this example:

if {Gift.Gift Date} in YearToDate then {Gift.Gift Amount}

The formula returns the gift amount if the date falls on any date from the first day of the calendar year to today. By using MonthToDate and YearToDate, you would no longer have to use parameters to specify your date range, and the formulas would not need editing at the end of each reporting period.