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

Passing Date To Parameter Field

Status
Not open for further replies.

664950

Programmer
Aug 27, 2001
28
BA
Please advise me how to pass Date to Parameter Field. I used CRDepoziti.ParameterFields(0) = "datum;Date(2002,24,03);TRUE", but it doesn't work. I have a message "Subcript out of range". datum is my parameter and CRDepoziti CR Designer
 
that might be because you are using a "0" element...try it for CRDepoziti.ParameterFields(1) instead

Jim
 
I tried with 1 and the message is Object does not support this property or method
 
Which integration method are you using? faq149-237 Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Sorry, do you mean:

OCX (Crystal32.ocx) or
RDC (CraxDrt.dll/CraxDui.dll)
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
The problem is that you are using the OCX syntax. You want to use a command like AddDefaultValue or AddCurrentValue, and an index that starts with 1, based on how many parameters you have in the report.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
OK I said:
CRDeponenti.ParameterFields(1).ClearCurrentValueAndRange
CRDeponenti.ParameterFields(1).AddCurrentValue (#2/2/2002#)

But I am still prompted for parameter filed value
 
The syntax looks correct.
Is there only one parameter?
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Yes only one, and when I enter the value from the prompt, my report discard the value that has been passed.
 
Is your prompt set to accept a date or a datetime? Check the data type. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top