Crystal 9.
Sql Server 2005
I have a week group on the report which is based on the following formula: datepart("ww",{CompTimeBlocks.StartDate})
In the group header section i have placed text boxes that display "Mon" "Tue" "Wed" ...."Sat"
Now my goal is based on the date range entered display the appropriate date and month. So for example if I run the report for 7/29/2008 - 7/29/2008 (only for a single day, I can sometime enter a week, or more than a week)
The report should dispay
Mon Tue Wed Thur Fri Sat
28-Jul 29-Jul 30-Jul 31-Jul 1-Aug 2-Aug
I already have the formulas written, but the problem is my report currently displays the following wrong months for friday and saturday, only when it has to cross to the next month otherwise if it has to display a week within the same months, it works correctly.
Mon Tue Wed Thur Fri Sat
28-Jul 29-Jul 30-Jul 31-Jul 1-Jul 2-Jul
The formulas I have are:
@MinStartDate
({CompTimeBlocks.StartDate} - Weekday({CompTimeBlocks.StartDate}))+ 2
@1stdayofweek
DateSerial(year({@MinStartDate}), month({@MinStartDate}), day({@MinStartDate}))
@2nddayofweek
DateSerial(year({@MinStartDate}), month({@MinStartDate}), day({@MinStartDate}+1))
@3rddayofweek
DateSerial(year({@MinStartDate}), month({@MinStartDate}), day({@MinStartDate}+2))
.....
@6thdayofweek
DateSerial(year({@MinStartDate}), month({@MinStartDate}), day({@MinStartDate}+5))
Sql Server 2005
I have a week group on the report which is based on the following formula: datepart("ww",{CompTimeBlocks.StartDate})
In the group header section i have placed text boxes that display "Mon" "Tue" "Wed" ...."Sat"
Now my goal is based on the date range entered display the appropriate date and month. So for example if I run the report for 7/29/2008 - 7/29/2008 (only for a single day, I can sometime enter a week, or more than a week)
The report should dispay
Mon Tue Wed Thur Fri Sat
28-Jul 29-Jul 30-Jul 31-Jul 1-Aug 2-Aug
I already have the formulas written, but the problem is my report currently displays the following wrong months for friday and saturday, only when it has to cross to the next month otherwise if it has to display a week within the same months, it works correctly.
Mon Tue Wed Thur Fri Sat
28-Jul 29-Jul 30-Jul 31-Jul 1-Jul 2-Jul
The formulas I have are:
@MinStartDate
({CompTimeBlocks.StartDate} - Weekday({CompTimeBlocks.StartDate}))+ 2
@1stdayofweek
DateSerial(year({@MinStartDate}), month({@MinStartDate}), day({@MinStartDate}))
@2nddayofweek
DateSerial(year({@MinStartDate}), month({@MinStartDate}), day({@MinStartDate}+1))
@3rddayofweek
DateSerial(year({@MinStartDate}), month({@MinStartDate}), day({@MinStartDate}+2))
.....
@6thdayofweek
DateSerial(year({@MinStartDate}), month({@MinStartDate}), day({@MinStartDate}+5))