Solved

Parameter Fields - Date/Time to Date

Posted on 2011-02-28
4
359 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
  • 2
4 Comments
 
LVL 100

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 100

Accepted Solution

by:
mlmcc earned 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cross tab report accumulative amount 9 55
Speed Up Crystal Report 5 61
Crystal Report for VS2013 17 129
Visual Studio .Net 2012 and Crystal Reports 9 91
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 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