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!

Date parameter

Status
Not open for further replies.

Hattusas

Programmer
Nov 11, 2001
344
TR
If I call my report from ASP,what is the synteax of passind date parameter to my report.

set session("ParamCollection") = Session("oRpt").Parameterfields
set Param6 = session("ParamCollection").Item(6)
ParamValue6 = "Date(2001,11,10)"
Call Param6.SetCurrentValue(CStr(ParamValue6))

is the syntax I tried.ParamValue6 is my sixth parameter but the compiler gives error.

cpeaut32 error '800a753c'

Invalid enum value.

I also tried different syntaxes such as

ParamValue6 = "10/11/2001"
ParamValue6 = 10/11/2001

but they were fruitless either.Doeds anyone knows the correct date syntax in ASP?
 
If your parameter type is a date in CR, change it to a String. Then, change this line:

Call Param6.SetCurrentValue(CStr(ParamValue6))

to

Call Param6.SetCurrentValue(CStr(ParamValue6),12)

Hope this helps!
 
Mmaz thanks for your time but I found the solution after researching :)).Here is the correct syntax :

set Param6 = session("ParamCollection").Item(6)
Call Param6.SetCurrentValue(dateValue("11/11/2001"))

It worked nicely!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top