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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Access Date fields in a parameters (v8.5)

Status
Not open for further replies.

njwcad

Technical User
Oct 16, 2002
156
GB
I am trying to create an 8.5 report that uses a parameter to filter the report by date ranges.

The field required is a date-time field in the source database (Access 97), Crystal sees this database as a string. I can translate the string in to a date field using a formula but of course parameters can not use formulas. Any way out of this?

Regards

Peter Thompson,
 
I use datetimes from Access in CR 8.5 often without a hitch.

You can base the record selection formula on a parmeter = a formula, and in some cases it will even pass the SQL to the database.

But there are other solutions here. You didn't state what type of connectivity you're using to the Access database, which can allow for you to use a SQL Expression to convert the data to a datetime type.

Try changing the type of connectivity to ODBC, that way you can use SQL Expressions and use the Show SQL Query to see what's being passed to the database.

Please go into the Access database and verify that it is a datetime, I doubt that it is.

You can also create a Query in Access to convert the data to a datetime if it isn't, and base the report on the query (Turn on Views in the data explorer to see Queries in Access).

Hope this helps.

-k
 
Thanks for your reply.

I am using an ODBC connection to the DB.

I have conformed that the field is a short date format date time field. Can this be an ODBC driver issue?? (Clutching at straws)

I can live with this as a string in the parameters if need be.

Cheers

Pete.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top