Hopefully this will be easy, but as someone that is new to CR9, I am having problems getting this right.
Here is the scenario: I need a production report. We run 3 shifts 24/7. shift 1 is from 7AM to 3PM, shift 2 is from 3PM to 11PM, and shift 3 is from 11PM to 7AM. I will need the report to be able to look at any days, or range of days, production. Easy enough so far, this is basic. What I am having issues with is handling the 3rd shift information.
Since 3rd shift spans 2 physical dates it needs to be part of the previous dates production(days start at 7AM not 12AM). I am just confused about how to get CR9 to handle this scenario.
example:
If 12/22/04 is selected, I need the report to group each shifts data for that day so I would have -
Production Date 12/22/04
Shift 1 (date 12/22/04 starting at 7AM, stopping at 3PM)
<shift data>
Shift 2 (date 12/22/04 starting at 3PM, stopping at 11PM)
<shift data>
Shift 3 (date 12/22/04 AND 12/23/04 starting at 11PM, stopping at 7AM)
<shift data from 11PM to 11:59PM would fall properly, 12AM to 7AM have different date but are part of 12/22/04 production>
<EOR>
Data available is: date, time, shift #, numeric data pertaining to shift production.
Any help is appreciated.Well, this looks more like a data managment/structuring problem than a Crystal problem.
Here's my take on it:
Your shifts all get allocated a day on which they start, and then a shift type.
So for 3 Jan 2005 the data will look like this:
DATE SHIFT PRODUCTION
03/01/2005 D 507
03/01/2005 A 655
03/01/2005 N 489
(I've made up some production data just to give you the general idea).
So then when you structure your query, you're not looking at the timestamp that the data was entered on, your using the DATE field to group you data by date, and then your SHIFT field to break it down to shift level.
So it doesn't matter what date they finished on, the date entered is the day they started.
Dave
No comments:
Post a Comment