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!

invalid parameter feild error

Status
Not open for further replies.

vman2

Programmer
May 9, 2002
3
GB
Hi, im trying to set a cr7 parameter from vb6.this is the code i have used.

CrystalReport1.ParameterFields(1) = "TWC"

I tried using

'CrystalReport1.ParameterFields(1).AddCurrentValue (txtTarName)

but upon adding the .addcurrentvalue this did not appear as an auto complete infact nothing did which leeds me to think maybe cr7 has not installed a component which i need?

the error i receive is run time "invalid parameter feild "

but it does exist in CR and exicutes the code until it reaches CrystalReport1.Action = 1 if i wave the mouse over this i get CrystalReport1.Action = 1 = <property is write only> any ideas? thanks

 
see faq149-237 and tell us which integration method you are using. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
ok, im using an ocx control, the other thing is. if i comment out the line,it prompts me for the parameter and then runs the report correctly.
 
The OCX uses a zero based index, try:

CrystalReport1.ParameterFields(0) = &quot;TWC&quot;

The other syntax is for the RDC, not the OCX. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I'm having the same problem, and I tried using both 0 based and 1 based index, same error both times. I am also using the .ocx. I have 6 parameter fields and I cannot get to pass the parameters in automatically. If it makes a difference, my first two parameters (the ones I want to input automatically) are date values (start date and end date). Thanks in advance,

Jacob438
 
Are you passing date literals in Crystal syntax?

Date (yyyy,mm,dd) 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