Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Parameter Fields - Date/Time to Date

Posted on 2011-02-28
4
Medium Priority
?
364 Views
Last Modified: 2012-05-11
I need to filter my report by some date fields.  I created a parameter field for the database field and tried to select "Date" type.  However, when I fill in the rest of the info and click "Ok", then open it again, none of the info is retained.  Only if I set the type to "Date Time" will the parameter field work.

The problem is that, when the report gets diplayed and the prompt opens to enter or select the date(s), a time (0:00:00) is required to be typed in (or automatically added if the calendar is used).

How do I set it up so only a date is required?

TIA
0
Comment
Question by:Clif
[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
  • 2
4 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 35001416
You can use a date parameter.

WHat field are you comparing to?  What data type is it?

You can filter with a formulalike

Date({YourDateTimeField}) = {?Date1}

mlmcc
0
 
LVL 10

Author Comment

by:Clif
ID: 35001731
That's what I thought.  However, it doesn't appear to work.

The field is a SQL Server Datetime data type.

I create a new Parameter Field, type in it's name, select "Date" for the Type, select the proper field in the Value Field listbox, then I select "Allow range values" in the Options and click "Ok".

Reopening the Parameter Field with "Edit", the Value Field is set to "(None)"
0
 
LVL 12

Expert Comment

by:HugoHiasl
ID: 35001995
There is a problem with handling DateTime and Date types in Crystal Reports.

I would recommend creating a DATE parameter for nice entry. Use this parameter field in a formula field which converts the value to a DateTime field and use this formula as parameter for your query.

0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 35002763
Since the field type is really DATETIME I suspect Crystal doesn't maintain it.  That value in the parameter screen is only used to be able to load the values.

Are you using a dynamin or static parameter?

You can use parameters in the SELECT EXPERT to filter the data for the report.  

mlmcc
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

670 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