By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,795 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,795 IT Pros & Developers. It's quick & easy.

Crystal Reports XI - Date Range Parameter

P: 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
Share this question for a faster answer!
Share on Google+

Post your reply

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