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

Passing VB parameter to Crystal

Status
Not open for further replies.

kameta

IS-IT--Management
Jan 17, 2001
16
0
0
KE
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top