I have just finished a report writing project using SQL Server Reporting Services, where I had to calculate the start and end dates of calendar periods.
It is always during these projects that sometimes I wish I was using the other reporting tool, as they have an easier way of doing things.
So here is a tip to getting Crystal Reports to calculate the first and last days of a calendar time periods:
First Day of the Year: Minimum (YearToDate)
First Day of the Month: Minimum (MonthToDate)
First Day of Previous Month: Minimum (Last Full Month)
Last Day of Previous Month: Maximum (LastFullMonth)
First Day of Current Week: Minimum(WeekToDate)
First Day of Previous Week: Minimum (LastFullWeek)
Last Day of Previous Week: Maximum (LastFullWeek)
|