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!

passing date range from vbscript

Status
Not open for further replies.

williey

Technical User
Jan 21, 2004
242
how do you pass date ranges from vb script? I keep getting "parameter field value is not range" error. Tried a number of ways to pass the value but to no avail.
The following is the different ways I have tried:

oRptStatParam1.AddCurrentValue ("04/01/2004 04/26/2004")
oRptStatParam1.AddCurrentValue ("04/01/2004 - 04/26/2004")
oRptStatParam1.AddCurrentValue ("04/01/2004, 04/26/2004")
oRptStatParam1.AddCurrentValue ("04/01/2004 to 04/26/2004")
 
Try:

oRptStatParam1.AddCurrentRange CDate("04/01/2004"), CDate("04/26/2004"), CDbl("3")

From the asp samples:
'The AddCurrentRange method takes three arguments.
' AddCurrentRange LowerBoundValue, UpperBoundValue, CRRangeInfoConstant
'The CRRangeInfoConstant of 3 indicates that the range should include values greater than or equal to
'the lower bound and less than or equal to the upper bound.

-dave
 
Dave,
I get "Wrong number of arguments or invalid property assignment:'AddCurrentValue' error when trying out the following

oRptStatParam1.AddCurrentValue CDate(startDate), CDate(endDate), 3

or

oRptStatParam1.AddCurrentValue CDate(startDate), CDate(endDate), CDbl("3")
 
Dave..nevermind about the last post.. I got it to work. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top