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

Grouping and Sorting: Custom display order

Status
Not open for further replies.

n2nuk

IS-IT--Management
Dec 24, 2002
190
GB
I need to produce a report that i can use to count the number of instances or episodes of contacts that occurred within 72 hours of the initial contact being recorded.
I have currently grouped my report on the individual record and then by date and time. The 'section will be printed' drop allows the list to be displayed by week, day, month etc. but it does seem to be possible to add to it

Any ideas greatly appreciated.

Many thanks in advance
 
Use a record selection formula like this:

{table.datetime} in {table.initialcontact} to datetime(dateserial({table.initialcontact}), timeserial(hour({table.initialcontact})+72,minute({{table.initialcontact}), second({table.initialcontact})))

If the initial contact is not a separate datetime field, but only the first datetime field, then replace {table.initialcontact} in the formula above with a SQL Expression {%initcontact}:

(
Select min(a.`datetime`)
From table a
Where a.`person`=`table`.`person`
)

Depending upon your database you might have to use different punctuation (quotes), and also depending upon your version of CR you might have to omit the 'a' in the first line only.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top