Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Search for next date Post Reply Post New Topic
Author Message
garys
Newbie
Newbie
Avatar

Joined: 15 Jan 2008
Location: South Africa
Online Status: Offline
Posts: 6
Quote garys Replybullet Topic: Search for next date
     Posted: 21 Jan 2008 at 3:37am

Hi all

Please can someone give me some pointers on how to design this report?

I have a report that will pull the balance of the savings for the date range that I specify that will be populated from my main report.  The output would look like this in the sub report and my date range is 2007, 05,01 to 2007,12,31:

Tran-date            Sequence number        Balance

2007/05/03                         22                2563.25

2007/06/17                         23                2345.25

2007/08/03                         24                4563.25

2007/11/26                         25                3652.25 

 

What I would like to do is select the next date and only show that balance.  As you can see, my start date does not equal the first transaction date.  I would like to tell crystal to search for the next date and only show me that balance. I would also like to only see the balance before my last date. E.g.  2007/05/03 - 2563.25 and 2007/11/26 - 3652.25. I would only want to show the first and last balance that is closest to my date range.

 

Any ideas on how I can accomplish this.

IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 21 Jan 2008 at 5:35am
hi
 
while printing the records in the details you can supress the records using the conditional formula. syntax would be as follows
 
check supress and in the formula section add this formula
 
Maximum({abc.trandate}) <> {abc.trandate} and Minimum ({abc.trandate}) <> {abc.trandate}
 
where abc is table name and trandate is field name u will get only the maximum and minimum trandateThumbs%20Up
 
 
Thanks
Savan
IP IP Logged
garys
Newbie
Newbie
Avatar

Joined: 15 Jan 2008
Location: South Africa
Online Status: Offline
Posts: 6
Quote garys Replybullet Posted: 22 Jan 2008 at 12:17am
Thanks Savan
 
It seems to be working perfectly..
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