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

What is the correct format of passing Datetime parameter from VB

Status
Not open for further replies.

anshul1966

Programmer
May 25, 2001
5
US
Hello
I have a input parameter of datetime type in my report called "FromDate" and I am trying to pass the value through my ocx control in Visual Basic. I have tried all the followin ways of sending but it is always givng me error "invalid parameter value". The formats I have tried are:
CrystalReport1.ParameterFields(0) = "FromDate;datetime(" & Format(l_s_Time, "YYYY;MM;DD;HH;MM;SS") & ");true")

CrystalReport1.ParameterFields(0) = "FromDate;datetime(" & Format(l_s_Time, "YYYY,MM,DD,HH,MM,SS") & ");true")

CrystalReport1.ParameterFields(0) = "FromDate;datetime('" & Format(l_s_Time, "YYYY/MM/DD HH:MM:SS AMPM") & "');true")

I hope somebody can help me with this.

Thanks
 
The first parameter for Crystal Reports is
CrystalReport1.ParameterFields(1) = etc Malcolm Wynden
I'm for sale at malcolm@wynden.net
 
Malcolm I have checked it and found that all crystal activeX control property arrays(like formula,parameterfields) are 0 based
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top