I have an Crystal Report (v8.5) reading an Access 2000 database, table name = tbl_DSPTIME.
The table contains data pertaining to fire emergency calls, which we use to determine if we are meeting standards on-scene times. Each EVENT may contain one or more records depending on the number of units dispatched to the fire. Each unit responding to the EVENT has data for DSPTIME, ENRTIME and ONSTIME. There may be as many as 8 units dispatched to an EVENT.
In addition to the table fields, the report contains duration times calculated from the DSP, ENR and ONSTIME fields - TURNOUT(ENRTIME - DSPTIME), DRIVE(ONSTIME - ENRTIME) AND TOTAL(ONSTIME - DSPTIME)
Example1 - (No unit makes it to the scene within 4 minutes or less (TOTAL):
EVENT UNIT DSPTIME ENRTIME ONSTIME TURNOUT DRIVE TOTAL
0101206 E1 11:31:10AM 11:33:00AM 11:38:44AM 1:50 5:44 7:34
0101206 E3 11:31:10AM 11:32:43AM 11:39:54AM 1:33 7:11 8:44
0101206 TK1 11:31:10AM 11:33:12AM 11:42:33AM 2:02 9:21 11:23
Example - (At least one unit makes it to the scene within 4 minutes or less (TOTAL):
EVENT UNIT DSPTIME ENRTIME ONSTIME TURNOUT DRIVE TOTAL
1040172 E5 12:02:30AM 12:03:57AM 12:04:08AM 1:27 0:11 1:38
1040172 E4 12:00:05AM 12:01:32AM 12:05:52AM 1:27 2:20 5:47
1040172 TK1 12:02:41AM 12:04:18AM 12:08:58AM 1:37 2:40 8:17
The report is grouped by EVENT (sorted asc), and has a secondary sort on TOTAL - the first record in each grouped EVENT will be the lowest TOTAL time.
I want to be able to color the entire group of records if none of the units arrives (TOTAL) within 4 minutes or less. Conversely, if any one or more units does arrive within the allotted 4 minutes, then the group of records would not be colored. I have achieved partial success at a record level by coloring the first record if the TOTAL time is more than 4 minutes, but it's not a very elegant solution. In addition, I would like to produce a count of the groups that get colored, i.e. no unit arrives within the 4 minutes.
I'm stumped... can any of you gurus help? I can provide more explanation if I have been too vague.
Thanks in advance
-Stan-
The table contains data pertaining to fire emergency calls, which we use to determine if we are meeting standards on-scene times. Each EVENT may contain one or more records depending on the number of units dispatched to the fire. Each unit responding to the EVENT has data for DSPTIME, ENRTIME and ONSTIME. There may be as many as 8 units dispatched to an EVENT.
In addition to the table fields, the report contains duration times calculated from the DSP, ENR and ONSTIME fields - TURNOUT(ENRTIME - DSPTIME), DRIVE(ONSTIME - ENRTIME) AND TOTAL(ONSTIME - DSPTIME)
Example1 - (No unit makes it to the scene within 4 minutes or less (TOTAL):
EVENT UNIT DSPTIME ENRTIME ONSTIME TURNOUT DRIVE TOTAL
0101206 E1 11:31:10AM 11:33:00AM 11:38:44AM 1:50 5:44 7:34
0101206 E3 11:31:10AM 11:32:43AM 11:39:54AM 1:33 7:11 8:44
0101206 TK1 11:31:10AM 11:33:12AM 11:42:33AM 2:02 9:21 11:23
Example - (At least one unit makes it to the scene within 4 minutes or less (TOTAL):
EVENT UNIT DSPTIME ENRTIME ONSTIME TURNOUT DRIVE TOTAL
1040172 E5 12:02:30AM 12:03:57AM 12:04:08AM 1:27 0:11 1:38
1040172 E4 12:00:05AM 12:01:32AM 12:05:52AM 1:27 2:20 5:47
1040172 TK1 12:02:41AM 12:04:18AM 12:08:58AM 1:37 2:40 8:17
The report is grouped by EVENT (sorted asc), and has a secondary sort on TOTAL - the first record in each grouped EVENT will be the lowest TOTAL time.
I want to be able to color the entire group of records if none of the units arrives (TOTAL) within 4 minutes or less. Conversely, if any one or more units does arrive within the allotted 4 minutes, then the group of records would not be colored. I have achieved partial success at a record level by coloring the first record if the TOTAL time is more than 4 minutes, but it's not a very elegant solution. In addition, I would like to produce a count of the groups that get colored, i.e. no unit arrives within the 4 minutes.
I'm stumped... can any of you gurus help? I can provide more explanation if I have been too vague.
Thanks in advance
-Stan-