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

need to know how to do it

Status
Not open for further replies.
Mar 17, 2003
60
US
i have a field ondate and i calculate 30 dates from that ondate for each record.
i sort the report by ondate.
now what i need to look at is the ondate of record #2 within the ondate and calculated date of the record above it.

can anyone help me?
thanks
jill messier
computer control corp
860-529-6232
jillm@ccc24k.com
 
The requirement is unclear:

"now what i need to look at is the ondate of record #2 within the ondate and calculated date of the record above it."

How do you have an ondate within an ondate?

Try posting example data and expected output.

To look at a previous rows value from within a formula, use the previous({table.field}), to look at the next value from within a formula, use next({table.field})

-k
 
sorry about that.
company history class 30 days
ondate out
sam smith company 1/4/04 cancel 2/3/04
1/21/04 taken


I need to know if the 1/21/04 class was within the 30days of the cancealled class.
they have to the class within 30 days or loose it.
the client needs to know via a report if this is happening.

so i'm looking at the second row and comparing the ondate for that record with the 30 days out record above it. becasue the one above it is cancelled.

please ,call me if this doesn't make sense.
 
Try grouping on the company, and sorting by the ondate, ascending. Then create a formula like:

if {table.company} <> previous({table.company}) then
"" else
if {table.class} = "Taken" and
previous({table.class}) = "Cancel" then
(if {table.ondate} <= previous({@30 days}) then
"Within 30 Days" else
if {table.ondate} > previous({@30 days}) then
"Outside of 30 Days") else ""

//where {@30days} = dateadd("d",30,{table.ondate})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top