Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date/Time Error for Parameter Date Range 1

Status
Not open for further replies.
Sep 11, 2008
25
US
We use Crystal 11
Our dates are stored as Date/Time values. I have created a date range parameter, selected Date for the Type and Allow Range Values for Options. When I run the report, I get no data and an error like "Field requires a date/time value".

I tried converting the date/time to a date in the following formula called Date:
CDate ({HPD_Help_Desk.Submit Date})

...and inserted the converted date in the selection criteria.
{HPD_Help_Desk.Company} = "ITS Help Desk" and
{@Date} in ({?Date Range})

What am I missing here?

Thanks!
 


Use two parameters and not a range parameter, then directly in the record selection formula and type in selection filter. Do not use the select expert wizard as it will not allow you to mix datetime fields with date param

Formula will look like

{table.datetimefield}>= {?StartDate} and
{table.datetimefield}<= {?EndDate}

When you run report look at the SQL and you will see that crystal converts date params into correct date time values.

Ian



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top