469,934 Members | 1,750 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

Crystal Reports XI - Date Range Parameter

1
Appreciate if you all can help me to solve my Crystal Report problems
First, I create some parameters and one of the parameters is Date. I set the parameter for the date is String.
For example :
parameter 1 - From Collection Date
parameter 2 - To Collection Date

I should display the results base on this selection criteria :
1) specific date - to enter specific date in FROM and TO field eg 20071227 to 20071227
2) greater or equal date - enter at FROM date field eg 20071227 to (null). System will display data with date 20071227 and greater.
3) less or equal date - enter at TO date field eg (null) to 20071227. System will display data with date less than until 20071227.
4) range of dates - to enter at FROM date field and TO date field eg 20071201 to 20071227. System will display data with date between 20071201 and 20071227.

I create a formula at Record Selection (Select Expert) as per below:

(If {?Collection Date} <> 'ALL' and {?To Collection Date} <> 'ALL' Then
ToText({CPS_DM05_VW.BATCH_DATE}) IN ToText({?Collection Date}) to ToText({?To Collection Date})
Else if {?Collection Date} <> 'ALL' and {?To Collection Date} = 'ALL' Then
ToText({CPS_DM05_VW.BATCH_DATE}) <= ToText({?Collection Date})
Else if {?To Collection Date} <> 'ALL' and {?Collection Date} = 'ALL'Then
ToText({CPS_DM05_VW.BATCH_DATE}) >= ToText({?To Collection Date})
Else
True)

The problem is...I cannot get the right data base on selection criteria for No. 2 and 3
I hope you can help me to solve this problem.
TQSM
Jan 2 '08 #1
0 3500

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Scott Hatfield | last post: by
1 post views Thread by Stephan | last post: by
3 posts views Thread by Vivek | last post: by
reply views Thread by Tumurbaatar S. | last post: by
reply views Thread by Raymond Luxury-Yacht | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.