[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Date Picker Crystal Reports

Posted on 2010-11-16
11
Medium Priority
?
1,386 Views
Last Modified: 2012-05-10
Hi,

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.

Thanks
0
Comment
Question by:Dan560
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 8

Accepted Solution

by:
kingjely earned 1600 total points
ID: 34145658
go to Field Explorer.
go to Parameter Fields
Right click.

new..
give it a name
STARTDATE
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
NEW.
Choose your 'datefield'
now choose 'is between' from the drop down box

and then choose
{?STARTDATE}  and {?ENDDATE}

Then refresh your report.

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

Hope it helps!
Kj



1
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 400 total points
ID: 34145744
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.
0
 
LVL 8

Expert Comment

by:kingjely
ID: 34145792

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

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

;)
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 8

Expert Comment

by:kingjely
ID: 34145807
Or you mean it could be Date time? maybe ? Okay ;)
0
 
LVL 2

Author Comment

by:Dan560
ID: 34145810
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?
0
 
LVL 2

Author Comment

by:Dan560
ID: 34145834
Not date parameter... I meant that is the way the date is displayed within my table!
0
 
LVL 8

Expert Comment

by:kingjely
ID: 34145879
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..

0
 
LVL 8

Expert Comment

by:kingjely
ID: 34145895
..   YourDateField' in your table ..  Yes :)
0
 
LVL 77

Expert Comment

by:peter57r
ID: 34146035
Based on your example data then your parameter MUST be a datetime parameter NOT a Date parameter.
0
 
LVL 2

Author Comment

by:Dan560
ID: 34146413
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?



startdate.png
enddate.png
0
 
LVL 2

Author Comment

by:Dan560
ID: 34146520
It's working! Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question