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

Finding Duplicate / Overlapping DateTimes

Status
Not open for further replies.

DanaReale

MIS
Jun 22, 2004
4
US
I am using Crystal X on a SQL database.

I am pulling a report to try and find duplicate billing entries, or entries that overlap (double-billing).

I have one DateTime field with the start DateTime, and another field with the end DateTime for each appointment.

I have created a comparon formula that will check and see if the current row's End field is between the previous field's start-end times, as well as the next field's start-end times.

This is great for a small set of information, but I am being asked to run this for all staff, which will be hundreds of pages of records. I would love for the report to only pull the rows that have something displayed in that comparison formula field.

Unfortunately, since the comparison field is evaluating while reading/printing records, I can't supress rows without it breaking the formula.



Does anyone have any suggestions on a better way to make this happen?

Here are the data elements available to me:

Start DateTime
End DateTime
Duration (diff between start and end time, in minutes)

Here is the formula that I am using to compare:
if {@End Time} in Previous ({@Start Time}) to Previous ({@End Time}) then "End Conflicts with Prev"
else if {@Start Time} in Previous ({@Start Time}) to Previous ({@End Time}) then "Start Conflicts Prev"
else if {@End Time} in Next ({@Start Time}) to Next ({@End Time}) then "End Conflicts with Next"
else if {@Start Time} in Next ({@Start Time}) to Next ({@End Time}) then "Start Conflicts with Next"
else
 
Suppressed records will still be read by your formula, so that shouldn't be a problem.

-LB
 
Thanks very much!

I found out that I was supressing if it was NULL, and I should have been supressing if it was "".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top