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

Identifying the first record with a given status.

Status
Not open for further replies.

Andyherm

Technical User
Nov 29, 2006
25
GB
Hi,
I'm trying to write a subreport which calculates the average time open for trouble tickets within a given time period.
Our ticket system treats a ticket as a master record with any number of service report records underneath.
The status of the ticket can be changed when logging a service report so we can and frequently do have tickets with for example 5 service reports where the status is open, open, wait, wait, comp.
I'm trying to write a formula which calculates the difference between the ticket open datetime and the service report completed datetime for the first service report where the status became "wait".
So far I've been unable to get anything that can identify the one service report I'm interested in and just use it's complete datetime.
Any help greatly appreciated.
 
Running totals can get the maximum or minumum for a date, within a group. They can also evaluate based on a formula, e.g. just for 'wait' records. You should be able to use them to get your result.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks Madawc, that's got the desired result.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top