Solved

Parameter Fields - Date/Time to Date

Posted on 2011-02-28
4
356 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now