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

Error when creating parameter fields

Status
Not open for further replies.

Niki_S

Programmer
Jun 4, 2021
232
0
0
LK
I havea foxpro form and I need to insert From date and To date into my crystal report. So that I created two variables like this.
Code:
_FromDate=thisform.txtFrom.Value
_ToDate= thisform.txtTo.Value

After that I inserted parameter fields into my code as below,
Code:
.ParameterFields(0)  ="xFromDate;"+ _FromDate+";true"
.ParameterFields(1)  ="xToDate;"+ _ToDate+";true"

When I am run my form it says Operator/operand type mismatch. Why is that?
How can I insert my variables inside my code as parameter field?
Thank you.
 
A Parameter field in crystal reports should look like this: {?FromDate}

Are you creating the parameter in crystal or in foxpro?

Macola Software Veteran and SAP Business One Consultant on Training Wheels

Check out our Macola tools:

 
I'm creating the parameter in foxpro and I need to pass this to my crystal report.
 
I have no idea how to do what you are asking. You can create parameters in SQL, but crystal never recognizes them (to my knowledge). Why not create the parameter in Crystal? I believe this is what you MUST do.

If you are writing code such as VB.net rather a stand alone crystal report, you are in the wrong forum. Try posting in the crystal reports integrate forum. They may have a better answer.

Macola Software Veteran and SAP Business One Consultant on Training Wheels

Check out our Macola tools:

 
I am not sure how to handle Crystal Reports parameters in code. I have seen it before (working with a programmer). But it has been years ago since I worked with them. It should be documented somewhere.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top