Date Picker Crystal Reports


I am trying to create a field parameter in my Crystal Reports which will prompt the user to select dates within a date range. I then want the rest of the report to only show data that was added during those dates.

I have tried to do this but it is not filtering the data. Can anyone help? I don't get any error messages. But I just need to know the basics of creating this parameter.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

go to Field Explorer.
go to Parameter Fields
Right click.

give it a name
make it data type - DATE in the drop down box.
Choose 'OK'

Repeat, but call this Parameter Field - ENDDATE

now go to REport, Select Expert
Choose your 'datefield'
now choose 'is between' from the drop down box

and then choose

Then refresh your report.

Thats the basics of it, and will do what you asked !

Hope it helps!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
As above with one added comment..
You must make sure the parameter datatype is correctly specified - if your database field is Date datatype then the parameter must also be so; if the database field is datetime datatype then the parameter must also be so.

Hi Mr Peter!!
I though I mentioned that !?

give it a name
make it data type - DATE in the drop down box   <=========

Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Or you mean it could be Date time? maybe ? Okay ;)
Dan560Author Commented:
Thanks, my date parameter is in the following format - 04/11/2010 07:09:50
Will this work? Or do I need to create a formula to change the format?

Also if I open the report in crystal reports viewer will the user also get prompted for the date range options?
Dan560Author Commented:
Not date parameter... I meant that is the way the date is displayed within my table!
You mean your date filed is - 04/11/2010 07:09:50
Yea that will be fine,

when you refresh, you will be prompted for the 2 parameters you created,
{?STARTDATE} and {?ENDDATE} that you have appended to 'Yourdatetimefield'

As you selected in the select expert, 'Is Between' {?STARTDATE} and {?ENDDATE} then, whatever data falls with in the date range your users select when they are prompeted, these are the records that will be returned..

..   YourDateField' in your table ..  Yes :)
Based on your example data then your parameter MUST be a datetime parameter NOT a Date parameter.
Dan560Author Commented:
Thanks I really appreicate the help.

Unfortunately it is not displaying any data.

In the record select statement I get an error saying "a date-time is required here".. so I'm thinking it must be the date format?

Dan560Author Commented:
It's working! Thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.