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!

Need to create a formula that compares values from details 1

Status
Not open for further replies.

chrisgeek

Technical User
Oct 16, 2008
25
US
Hello,

I am writing a report and need to create some statistics. The report is showing findings that can be anywhere from "0/10" - "10/10" and can be returned in any frequency or order. For example The results might be 10/10, 10/10, 0/10, 5/10, 10/10. I would like to be able to say if the value is anything other than 0/10 is the next value within 90 minutes (comparing the time/date entered fields). If so then 1 else 0. Any ideas on how I could do this?
 
if not onlastrecord and
{table.value} <> "0/10" and
datediff("n",{table.datetime},next({table.datetime}) < 90 then 1

...but I bet you are then going to want to summarize this, and you will have to use variables to do that.

-LB
 
As always you are correct. Any hints on using the variables to summarize this. Working perfectly so far :)
 
//{@detail formula}:
Whileprintingrecords;
numbervar x := x + {@yourformula};

//{@displayresults} if summarizing at the group level, this belongs in the group footer; otherwise, in the report footer:
Whileprintingrecords;
numbervar x;

//{@reset} in the group header if summary is at the group level:
Whileprintingrecords;
numbervar x;
if not inrepeatedgroupheader then
x := 0;

-LB
 
Thank you very much for your assistance I couldn't have done it without you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top