Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula to find Overlapping Date Spans Post Reply Post New Topic
Author Message
Virusbot
Newbie
Newbie


Joined: 20 Aug 2013
Online Status: Offline
Posts: 5
Quote Virusbot Replybullet Topic: Formula to find Overlapping Date Spans
     Posted: 31 Jan 2014 at 5:52am
I been trying to find the best possible solution to doing an audit report to find Overlap, Invalid and Duplicate spans, but have come up short on the Overlap.

What I have so far is building a formula to compare the first row and the second row of the effective date and term date and mark if the second effective span is within the range of the term date but not having much luck.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jan 2014 at 5:58am
i would consider using joins on the table to an alias of itself to look for this. If you can use a stored proc all the better.
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 31 Jan 2014 at 7:03am
you could try to use next fiction.
something like
if date_field >= next(date_field) then "overlap" else "na"
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum