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!

pass parameter to crystal

Status
Not open for further replies.

ahhuang

Programmer
Apr 1, 2002
61
0
0
SG
I am using a crystal report control (crystl32.ocx)
I have created a parameter a crystal report, but how do i pass this parameter value into crystal report from VB??

extract of my code:
crystalreport1.parameterfields(0)=???

??? is the part i do not know how to write
 
crystalreport1.parameterfields nomeparameter;valor;true
 
Try somthing like this hope it helps.

ltr
Ramon

Dim CrXParamDefs As CRAXDRT.ParameterFieldDefinitions
Dim CRXparamDef As CRAXDRT.ParameterFieldDefinition

Set CRXApp = CreateObject("CrystalRunTime.Application")
Set CRXRpt = CrystalReport1
Set CRXparamDef = CRXRpt.ParameterFields.Item(1)

CRXRpt.DiscardSavedData
CRXparamDef.AddCurrentValue "Param1Value"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top