I am new to Crystal Report and VB. I am using Crystal Reports 8.5 and VB 6. I need help or sample code on how to pass a parameter value to Crystal Reports from VB.
Dim crxapp As New CRAXDRT.Application
Dim crxrpt As CRAXDRT.Report
Dim crxParameters As CRAXDRT.ParameterFieldDefinitions
Dim crxParameter As CRAXDRT.ParameterFieldDefinition
Dim Docket_no As String
Private Sub RunReport_Click()
Set crxrpt = crxapp.OpenReport("d:\projects\myvb\2ndpage.rpt"
CRViewer1.ReportSource = crxrpt
Set crxParameterFields = crxrpt.ParameterFields
Set crxParameterField = crxParameterFields.Item(1)
Docket_no = "123456"
crxParameterField.SetCurrentValue Docket_no
CRViewer1.ViewReport
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.