Can someone tell me why this would not work? I have a crystal report with one parameter that I needed to pass to crystal from VB. The two declarations are in my general.
I also tried this which did not work
crReport.ParameterFields(1) = "'Sector ID';para;TRUE"
Dim crsapp As crpeauto.Application
Dim crReport As crpeauto.Report
Private Sub CmdReportDirectory_Click()
Dim repo As String
Dim para As Integer
para = 1
repo = App.Path & "\rptDirectory_service.rpt"
Set crsapp = New crpeauto.Application
Set crReport = crsapp.OpenReport(repo)
crReport.ParameterFields(1) = para
crReport.Preview
End Sub
I also tried this which did not work
crReport.ParameterFields(1) = "'Sector ID';para;TRUE"
Dim crsapp As crpeauto.Application
Dim crReport As crpeauto.Report
Private Sub CmdReportDirectory_Click()
Dim repo As String
Dim para As Integer
para = 1
repo = App.Path & "\rptDirectory_service.rpt"
Set crsapp = New crpeauto.Application
Set crReport = crsapp.OpenReport(repo)
crReport.ParameterFields(1) = para
crReport.Preview
End Sub