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

record to record comparison?

Status
Not open for further replies.

eao

MIS
Nov 14, 2001
104
US
I am trying to write a report to display recurring Work Orders:

(Group by Subject, Client)

1. count (WO#) > 1, and
2. Datediff (OpenDate)less than or equal to x days of each other.

I can't figure out how to compare the OpenDate of multiple records. I thought about using the Select formula to set the date range, but I don't think that will work. I want to be able to run this report for the past six months, and return those records for a Client with the same subject if they were opened within 10 days of each other.

Advice? Thanks.
 
Based on this:

"I want to be able to run this report for the past six months, and return those records for a Client with the same subject if they were opened within 10 days of each other. "

Try the NEXT() function to suppress rows NOT of interest (place in the details suppress formula):

datediff("d",next({MyTable.OpenDate}),{MyTable.OpenDate}) > 10
and
{MyTable.Subject} = next({MyTable.Subject})
and
{MyTable.Client} = next({MyTable.Client})

Something like that should do it...

-k

kai@informeddatadecisions.com
 
Close, but Next only compares consecutive records?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top