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 range parameter passing?

Status
Not open for further replies.

gabster

Programmer
Oct 23, 2001
192
US
Anyone knows what format should have a date range parameter passed from VB code to CR?

I am reading the dates from a XML file with the VB appp and then I pass them to CR.

Thanks you.

Gabi.
 
I get a type mismatch error when I try to use this date format.

CustomerReport.ParameterFields(1).AddCurrentValue "1968,12,21"

Thanks,
Gabi.
 
There are many bugs in crystal when using a date as a parameter. I've given up and now pass the date as a string.

I pass '01 30 2001' to my stored procedures and then use the SQL to add the slashes back in.

SELECT @AsOf = substring(@AsOf,1,2) + '/' + substring(@AsOf,4,2) + '/' + substring(@AsOf,7,4)

Hope this helps.
 
Thanks a lot!!!

I tried this and it worked:

CustomerReport.ParameterFields(1).AddCurrentValue CDate("1980,10,17")

Now the only question remains, how should I code in VB if I want to pass a date range

Gabi.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top