Monday, March 12, 2012

Parameters that specifyDateTimeRange

My report is a productivity report on our Therapists. Some work from 6:45 am to 7:15P this is shift 1. Shift 2 works from 6:45 pm to 7:00 am.

I am using the PRACWork.Date Field which is a DateTime Field to get my date range and times worked, My report has a date parameter that allows me to pull a range of data for our Therapists but it doesn't pull the correct data for the night shift because there is no way to specify the shift times. The report consists of

Therapists Name
Dates Worked
Daily Productivity for each day
Productivity Average for each month.

Day shift works fine cause it doesn't span two days. Night shift is inaccurate because it only calculates the time for the one date entered and doesn't allow for the time that scales both days. So I figured that if I set up parameters My date parmeters are just parmeters set up on the date Therapist workdate. I have tried creating 4 params like this:

{PRACTWORK.DATE}in DTStoDateTime({?StartDate}+ ""+{?StartTime}
+":00.00")to
DTStoDateTime({?EndDate} + "" +{?EndTime}+
":00.00")

But it will not allow me to specify PM and AM and is not pulling the correct information. I have selected under my Report Options: "Convert DateTime to DateTime". I am connected to a SQL Mediserve Client via an odbc connection. Any help would be appreciated!

Thank you!Couple of questions here :

1. I would like to see actual data if you could paste few records here that would help a lot.

2. PRACWork.Date is datetime field , so I am hoping same field stores bothDate and Time.

3. "there is no way to specify the shift times " - this is not clear. Does that mean , report's parameter is not DateTime ? or no way to enter date with time ?

4. What version of Crystal are you using ?

Thanks

No comments:

Post a Comment