Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Averaging Times

Status
Not open for further replies.

IanMullineaux

Technical User
Dec 12, 2001
9
GB
Hi

I am new to Crystal and although I am managing to produce reports I am now stuck and would really appreciate some guidance from the experts..

I am creating a number of reports from clinical data that require the calculation of things like average ambulance call to hospital time

I have a report which takes data from 2 tables.
I use a group to seperate the calls into months
a subgroup for the hospitals and within that a group for the incident number itself - I have had to group the incident number as there may be more than one instance of the incident number if there are more entries in the other table...

I have worked out a formula which would appear to calculate the average time but it seems to create the average time for the whole report which could be a period of a year..

what i would like is to show the average times for each hospital, each month and then overall but having tried everything i can think of it isnt working..

could anyone tell me if what i am trying to do is possible and possibly point me in the right direction...

thanks

Ian
 
Where are you placing the formula in the report?

Can you paste the contents of the formula here?

-- Jason
"It's Just Ones and Zeros
 
Try using running totals, or maybe summary totals, which include averages in some versions of Crystal. (You should say which you have; 8.5, 9, 10, 11 or whatever.) Running totals always include averages, and can be reset for a group. Or can accumulate for an entire report from particular records in many groups, using a formula.

Right-click on a field and choose Insert to get a choice of Running Total or Summary. Or else use the Field Explorer, the icon that is a grid-like box, to add running totals.

Running totals allow you to do clever things with grouping and formulas. They also accumulate for each line, hence the name. The disadvantage is that they are working out at the same time as the Crystal report formats the line. You cannot test for their values until after the details have been printed. You can show them in the group footer but not the group header, where they will be zero if you are resetting them for each group.

Summary totals are cruder, but are based directly on the data. This means that they can be shown in the header. They can also be used to sort groups, or to suppress them. Suppress a group if it has less than three members, say. They default to 'Grand Total', but also can be for a group.


[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
I have managed to get it working now - i think my problems were partly using Date as opposed to datevalue and using the wrong combination of fields in te running totals sections...

thanks for taking the time to reply - its appreciated....

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top