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!

Trying to summarize a datediff formula

Status
Not open for further replies.

Krusher

IS-IT--Management
Jan 2, 2003
70
0
0
US
Here's my formula:

IF {WOSTATUS.STATUS} in ["DESIGN"] THEN
datediff ("d",{WOSTATUS.CHANGEDATE}, next({WOSTATUS.CHANGEDATE}

I have never been able to summarize this "type" of formula for whatever reason. Maybe someone out there can help. Thanks in advance.

-K
 
The next() function involves an evaluation across sequential records, which is why you cannot use an inserted summary. You haven't explained what kind of summary you want, but if you wanted to add the datediff's, you could use a variable like this placed in the detail section:

whileprintingrecords;
numbervar dtdiff := dtdiff + {@yourformula};

Then in the report footer, use:
whileprintingrecords;
numbervar dtdiff;

Instead of "in", I would also change the original formula to say:

IF {WOSTATUS.STATUS} = "DESIGN" THEN //etc.

-LB


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top