|
-
Sep 25th, 2007, 02:57 AM
#1
Thread Starter
New Member
Crystal VB6 - Passing multiple values to a parameter from VB6
Hi,
I am trying to pass multiple values to a parameter from VB6 to Crystal.
I have a parameter configured as to receive multiple discrete values, but can´t find the way to pass these values from VB6.
Any help would be apreciated.
Thanks,
Thomas
-
Sep 25th, 2007, 12:06 PM
#2
Re: Crystal VB6 - Passing multiple values to a parameter from VB6
Which version of Crystal?
Call the ParameterFieldDefinition.AddCurrentValue method for each value you want to pass to the report.
Code:
Private oCrystalApp As CRAXDRT.Application
Private Sub Command1_Click()
Dim oReport As CRAXDRT.Report
Dim oParms As CRAXDRT.ParameterFieldDefinition
Set oReport = oCrystalApp.OpenReport("C:\report1.rpt")
Set oParms = oReport.ParameterFields.GetItemByName("Customer Names")
oParms.AddCurrentValue "GODOS"
oParms.AddCurrentValue "BOTTM"
oParms.AddCurrentValue "CACTU"
oParms.AddCurrentValue "BSBEV"
With frmReportViewer
.rptViewer.ReportSource = oReport
.rptViewer.ViewReport
.Show
End With
End Sub
Private Sub Form_Load()
Set oCrystalApp = New CRAXDRT.Application
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set oCrystalApp = Nothing
End Sub
-
Sep 25th, 2007, 01:00 PM
#3
Thread Starter
New Member
Re: Crystal VB6 - Passing multiple values to a parameter from VB6
I am using Crystal version 8
Will try your code tomorrow.
Many thanks,
Thomas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|