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

Date field search

Status
Not open for further replies.

pmaxon

Programmer
Sep 25, 2003
68
US
I am using VB6 CR 8.5 and OCX. I have a database date/time field on a report in the format of mm/dd/yyyy. I am needing to pass a parameter from a form to search by yyyy. Would the conversion from mm/dd/yyyy to yyyy be done on the crystal side or the vb side and how might you do this?

TIA
 
BlurredVision posted a good FAQ about dates in the Crystal Formulas forum.

faq767-1973
 
You can do it on either side.

You can create a recordset and pass it to the report, or embed the parameter and pass it to the report and let Crystal handle it.

Here's the RDC sample applications:


Another factor would be what type of database object you're using (Table/View/SP/Function).

If the report might have functionality outside of your report, such as compiled on desktops or through other tools, I would suggest placing the parms in the report and then setting them from within CR so that the report is self contained.

-k
 
I using access 2000 database and the ocx not the rdc synapsevampire
 
Sorry, I missed that you were using the OCX, and I thought that you were using VB, not Access (Access uses VBA).

Consider switching to the RDC, the OCX is old technology.

-k
 
I'm using VB6 and an access database. This is an existing application which uses the OCX. There are numerous reports already setup with the OCX and I was a little nervous about switching everything over since the bulk of the application is working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top