Skip to Content
Former Member
Aug 05, 2008 at 06:27 PM

Passing a Parameter to a CR XI


I have created a report in Crystal Report XI

I have an application (VB6) which captures values and I would like to pass these parameters to this report in oder to determine the selection process


I want to pass an "order number" to this report in order for the report to select data based on this input.

VB code is as follows

Function CReport_DC(ml_no As Integer, ls_no As Integer)

Dim CrApps As CRAXDRT.Application

Dim CrRep As CRAXDRT.Report

Set CrApps = New CRAXDRT.Application

Set CrRep = CrApps.OpenReport("C:\MyReports\CC.rpt")


CrRep.ParameterFields.GetItemByName("Master_Load_No").AddCurrentValue ml_no

'CrRep.ParameterFields.GetItemByName("Load_Stop_No").AddCurrentValue ls_no

Screen.MousePointer = vbHourglass

CRViewer.ReportSource = CrRep


Screen.MousePointer = vbDefault

Set CrRep = Nothing

Set CrApps = Nothing

End Function

I receive the following error

error -2147189582 Invalid Name

I obviously need to link my parm "ml_no" and "ls_no" to valids name within the report but I do not know how?

Can someone please please help?