| Author |
Message |
JBrown.CM
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 14
|

Topic: Entering multiple date parameters Posted: 08 Apr 2011 at 3:46am |
|
I have a machine performance review that I have done daily by hand data-mining. It was not until this past work evening that I finally got the time to scavenge through our database and find the tables that I needed. I now have an adequate report, but there is one catch. I have a total for 24hrs, which is necessary, but I also need three separate sub categories breaking the 24hr total into three 8hr shifts. Easiest way i can think of is to have four separate reports but I cannot have that, I need all the information available at a single glance.
My question is:
Is there a way to pull data for an entire 24hr period in one row while having three separate rows pertaining to the same data but pulling in three separate 8hr increments.
Ex.
Press 1 Total - Hours Run .. Quantity Run .. Run Speed
Shift1 0600-1400 - Hours Run .. Quantity Run .. Run Speed
Shift2 1400-2200 - Hours Run .. Quantity Run .. Run Speed
Shift3 2200-0600 - Hours Run .. Quantity Run .. Run Speed
Edited by JBrown.CM - 08 Apr 2011 at 4:07am
|
IP Logged |
|
|
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 08 Apr 2011 at 3:56am |
Create a formula based on whatever field you're getting for your timestamp. I don't have Crystal on this workstation so I don't have the exact syntax, but it will look something like this:
If time({table.timestamp}) >= time(6, 0, 0) and time({table.timestamp}) < time(14, 0, 0) then "Shift 1"
else if time({table.timestamp}) >= time(14, 0, 0) and time({table.timestamp}) < time(22, 0, 0) then "Shift 2"
else "Shift 3"
Your first group in the report will be on some value that only occurs once in the report. You need this in order to get your totals at the beginning of the report.
Your second group will be the formula you just created. You can then create summaries to display the data rolled up to the 8-hour shift.
-Dell
|
|
|
IP Logged |
|
JBrown.CM
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 14
|

Posted: 08 Apr 2011 at 4:15am |
|
Thank you, that makes sense. I will try your solution as soon as I am able.
|
IP Logged |
|
JBrown.CM
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 14
|

Posted: 08 Apr 2011 at 5:24am |
|
Is there a way I can blanket that time stamp formula over each variable?
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 08 Apr 2011 at 5:38am |
What do you mean by blanket?
To do the summaries, either click on the summary button (Sigma - looks like an angular E) or click on the Insert menu and select Summary. Tell it which field you want, how you want to summarize it (sum, count, etc.) and which group you want to summarize it for. The summary will appear in the group footer - you'll want to move it to where you want it and reformat the font and borders.
-Dell
|
|
|
IP Logged |
|
JBrown.CM
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 14
|

Posted: 08 Apr 2011 at 8:19am |
|
I have formulas that supply all of my sums.
For example
Work Center 7 Time
Run Run% M/R M/R% Bad Bad%
6.0* 75% 1.0 12.5% 1.0 12.5%
*numbervar mr := Sum ({@TotalDecimalHours}, {PV_JobCosts.WorkcCode});
if mr <> 0 THEN
Sum ({@RunDecimalHours}, {PV_JobCosts.WorkcCode}) % mr
else
0;
|
IP Logged |
|
JBrown.CM
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 14
|

Posted: 08 Apr 2011 at 8:19am |
|
I don't know how I can explain an differently, but thank you for your help.
|
IP Logged |
|
JBrown.CM
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 14
|

Posted: 08 Apr 2011 at 8:30am |
|
brainstorm.
can create a new formula and select the already existing runhours formula and put a parameter on it that way? and just put new formulas in for each shift?
|
IP Logged |
|
JBrown.CM
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 14
|

Posted: 08 Apr 2011 at 8:33am |
|
time <=0600 >= 1400 {#GT2RunHours}
i tried that but it didn't work...
|
IP Logged |
|
JBrown.CM
Newbie
Joined: 08 Apr 2011
Online Status: Offline
Posts: 14
|

Posted: 08 Apr 2011 at 9:10am |
|
tried this
If time({#GT2RunHours}) >= time(6, 0, 0) and time({#GT2RunHours}) < time(14, 0, 0) then "Shift 1"
else if time({#GT2RunHours}) >= time(14, 0, 0) and time({#GT2RunHours}) < time(22, 0, 0) then "Shift 2"
else "Shift 3"
not quite it..
how can i learn this?
|
IP Logged |
|
|
|