I am using Crystal 10 with an Oracle database for a law enforcement 9-1-1 report. The report needs to accumulate committed time of all officers for area by hour-of-day for a three month period. The chart below shows what the report should look like, except there will be 24 hours going across the report (only four are shown due to space limitations) and 16 areas down the report (only four are shown).
Hour of Day
00 01 02 03
Area
111 30.5 22.4 16.0 12.2
112 16.8 23.2 11.9 33.4
113 44.6 55.4 60.0 42.8
114 25.5 30.3 21.0 39.7
Committed time is the amount of time officers spend on a call for service (a 9-1-1 call) and begins with the time the officer is sent and ends with the time the officer clears the incident. Those start and end times are present in the database along with a field that holds the total amount of time the officer spent on the call for service (start time - end time).
Where things get difficult is properly allocating committed time by hour of day. Commonly, some calls will last for several hours. For instance, assume a call for service begins at 01:45 and ends at 03:45, a total of two hours. The time should be allocated as follows:
15 minutes in hour 01
60 minutes in hour 02
45 minutes in hour 03
I have a working Crosstab, but it looks only at the time the call for service starts and then puts the total committed time in that hour of day. For instance, using the above example, 2.0 hours of committed time would all go into the 01 hour of day column because that is when the call started.
I have a development background in COBOL and know I could do this with COBOL table processing. Do arrays in Crystal serve the same function and could they be used to solve this problem? Or is there some other way to handle it? I have searched the threads thoroughly, but couldn't find anything that seemed to apply to my situation. My Crystal background would best be described as intermediate.
Thanks in advance for any forthcoming help,
Rooski
Hour of Day
00 01 02 03
Area
111 30.5 22.4 16.0 12.2
112 16.8 23.2 11.9 33.4
113 44.6 55.4 60.0 42.8
114 25.5 30.3 21.0 39.7
Committed time is the amount of time officers spend on a call for service (a 9-1-1 call) and begins with the time the officer is sent and ends with the time the officer clears the incident. Those start and end times are present in the database along with a field that holds the total amount of time the officer spent on the call for service (start time - end time).
Where things get difficult is properly allocating committed time by hour of day. Commonly, some calls will last for several hours. For instance, assume a call for service begins at 01:45 and ends at 03:45, a total of two hours. The time should be allocated as follows:
15 minutes in hour 01
60 minutes in hour 02
45 minutes in hour 03
I have a working Crosstab, but it looks only at the time the call for service starts and then puts the total committed time in that hour of day. For instance, using the above example, 2.0 hours of committed time would all go into the 01 hour of day column because that is when the call started.
I have a development background in COBOL and know I could do this with COBOL table processing. Do arrays in Crystal serve the same function and could they be used to solve this problem? Or is there some other way to handle it? I have searched the threads thoroughly, but couldn't find anything that seemed to apply to my situation. My Crystal background would best be described as intermediate.
Thanks in advance for any forthcoming help,
Rooski