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

Passing date parameter to Crystal - won't work

Status
Not open for further replies.

jjoy123123

Programmer
Oct 22, 2002
20
0
0
US
I'm trying to pass a date parameter from VB6 to Crystal 8.0. The text parameter is working, but I can not get the date to pass. Any suggestions? Here's my code:


With CrystalReport1
.ReportFileName = App.Path & "\PatientReport.rpt"
.ParameterFields(0) = "Name;" & txtName.Text & ";True"
.ParameterFields(1) = "DOB;" & CDate(txtDOB.Text) & ";True"
.PrintReport
End With
 
How about passing the date as it's; not converting it using CDate function?
 

Format$(txtDOB.Text,"yyyy,mm,dd") [/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
I tried

.ParameterFields(1) = "DOB;" & Format$(txtDOB.Text, "yyyy,mm,dd") & ";True"

It still wouldn't display the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top