Click to See Complete Forum and Search --> : Error Passing Paramater


satishbeh
June 14th, 2004, 06:23 AM
Hello Babu,

I am trying to open a crystal report from VB. Everything works fine.
When I am trying to assign a date parameter value, I get the error "Type Mismatch".

ie. txtdate="14/06/2004"
Report.ParameterFields(1).AddCurrentValue txtdate

where txtdate is a date variable.

I also tried cdate(txtdate)

when I try to pass variables other than type date it works fine.

Regards ,
Satish

harmonycitra
June 14th, 2004, 01:46 PM
Hi,

I passed a value from a DTPicker control. It works fine. Check the datatype which you have set while parameter creation. It'll work.

And try DTPicker. I used the same code as yours.

Report.ParameterFields(1).AddCurrentValue DTP1.Value


Regards,
harmonycitra

Madhi
July 7th, 2004, 01:13 AM
Hi,
When passing the date make sure that the date is of the format of the system date.

Madhivanan