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

Accepting a Parameter in Crystal Reports

Status
Not open for further replies.

JennB

Programmer
Joined
Feb 3, 2002
Messages
29
Location
CA
Hi. I am new to crystal reports and would like to set up a report that would accept a parameter from Visual Basic. I have not been able to find any place in the report to set it up to take a parameter and also am not able to find a parameter property for the report in VB. Thanks for your help.

Jenn
 
Jenn,
this is code from a command button, you need to set up the parameters in your report. Parameter fields can be created from the field explorer in Crystal. You then set the selection formula to use records from your parameter

crAE.ReportFileName = App.Path & "\\csae.rpt"
crAE.ParameterFields(0) = "Start Date;" & txtSStart & ";true"
crAE.ParameterFields(1) = "End Date;" & txtSEnd & ";true"
crAE.Action = 1
 
Thanks for your help. I may be really stupid but I can't find the field explorer in Crystal. Where is it? I think once I figure out how to set up the parameters I'll be ok. Thanks again.
 
I usually click the toolbar button (in the middle beside the one that says AB).

You can also get it from the menu with Insert/Field Obejct (or in earlier versions - Insert Database field, Insert/Parameter, Insert Formula, etc.) Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top