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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about summarising data

Status
Not open for further replies.

aftab45

Technical User
Mar 2, 2006
26
0
0
GB
Hello,

I'm writing a report which examines helpdesk data i.e. whether a problem record was resolved within an hour or not.

An example of the output I have currently is as follows:

Case 1
Main Helpdesk
22/11/2005 08:32 18/01/2006 Assigned 13:33 1
18/01/2006 13:33 17/03/2006 Pending 13:14 1

The results are grouped first on problem ID and then the group that looked at the problem. Each row represents the time it spent in a particular status. The '1' represents a formula which says:

If DateDiff("n", {Start Date and Time},
{End Date and Time}) > 60 Then 1 Else 0

What I want to achieve is to have the '1' appear just once for each record i.e. this problem took more than one hour to resolve. If I can do this, I can then do a summary and get the number of problem records that were/were not resolved within one hour.

Thank you in advance.



 
Get the 'maximum' for each problem ID, which will be 0 or 1.

You could then use Group Selection and get just those where it was 1.

Or if you just want the total, you could modify the Record Selection to just select records where start and end are separated by more than 60 minutes. This might also be done as a subreport in the report footer.

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). Using Windows XP & Crystal 10 [yinyang]
 
Use a running total where you sum your datediff formula, evaluate on change of status (assigned, pending, etc.), and reset never if you want the summary at the report footer level, or reset on change of group, if you want the summary at a group level. The running total(s) need to be placed in group or report footers.

-LB
 
Thanks to you both for your kind help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top