| Author |
Message |
harry8929
Newbie
Joined: 27 Sep 2012
Online Status: Offline
Posts: 2
|

Topic: Selection Statement Posted: 27 Sep 2012 at 12:24pm |
|
I am having an issue in trying to get a selection statement completed.
I have 3 fields and 4 parameters I am trying to work with:
txdate(date) i.e. 9/26/2012
labstarttime(string) i.e. 0584
endstarttime(string) i.e. 1426
[?]startdate
[?]enddate
[?]starttime (2 options; 0600 or 1800)6am to 6 pm shifts
[?]endtime (2 options;0600 or 1800) 6am to 6 pm shifts
I think I have it all with this selection formula:
{PV_JobCosts1.LabEndTime} < {?EndTime} and
{PV_JobCosts1.LabStartTime} > {?StartTime} and
{PV_JobCosts1.TxnDate} in {?StartDate} to {?EndDate}
BUT I have found a few transactions that do not pass muster. My parameters are ?StartDate and ?Enddate are 9/26/2012 and ?starttime=0600 and ?endtime=1800.
I have two records that come up up with:
date,starttime,endtime
9/26/2012,2344,0000
9/26/2012,1929,0000
I am sure the endtimes being 0000 are the problem, but I am not sure how to correct it.
Does anyone have any good thoughts?
|
IP Logged |
|
|
|
comatt1
Senior Member
Joined: 19 May 2011
Online Status: Offline
Posts: 337
|

Posted: 28 Sep 2012 at 5:07am |
|
why would you need to have 4 parameters? if the shifts are always 12 hours, could should only need to ask Shift 1 or 2
|
IP Logged |
|
harry8929
Newbie
Joined: 27 Sep 2012
Online Status: Offline
Posts: 2
|

Posted: 28 Sep 2012 at 5:24am |
|
They do not necessarily want to only see it by shifts. They may want to just look at one shift or they may want it to run for a "24 hour" period (6am to 6am) or they may want to look at it for a week (Sunday to Saturday).
|
IP Logged |
|
comatt1
Senior Member
Joined: 19 May 2011
Online Status: Offline
Posts: 337
|

Posted: 28 Sep 2012 at 5:28am |
|
First thing that jumps out at me is, you should have <= >= in the time parms, however, there is more.
If someone starts at 5:15am on a day, do you want this to show? like on Sept 26th in the report?
|
IP Logged |
|
|
|