Print Page | Close Window

Account transactions within 72hours

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=6416
Printed Date: 01 May 2024 at 8:29pm


Topic: Account transactions within 72hours
Posted By: halekat
Subject: Account transactions within 72hours
Date Posted: 20 May 2009 at 1:42pm

I need know how to pull just the transactions that occur within 72 hours of each other for a specific time period. The 72 hour will start with the complete date to the next arrival date. 

Start Date ______Customer ID       transaction #   Complete Date
05/08/2009            1                          1                     05/08/2009
05/09/2009            2                          2                     05/10/2009
05/10/2009            3                          3                     05/10/2009
05/11/2009            2                          4                     05/11/2009
05/11/2009            4                          5                     05/12/2009
05/12/2009            5                          6                     05/12/2009
05/13/2009            4                          7                     05/13/2009


-------------
Thanks



Replies:
Posted By: DBlank
Date Posted: 20 May 2009 at 1:52pm
1. I assume that since you are not displaying hours you want it to be within 3 days rather than 72 hours...
2. I assume the referred to "arrival date" being displayed as "start date"...
3. I assume you want both records to that meet the 3 day condition to appear, not just the first record...
You could conditionally suppress rows using the next() and previous() functions with a datediff as:
datediff("d",completiondate,next(startdate))>3 and
datediff("d",previous(completiondate),startdate)>3



Print Page | Close Window