how do you pass a parameter from VB to Crystal without the "Enter Parameter Values" box popping up?
Printable View
how do you pass a parameter from VB to Crystal without the "Enter Parameter Values" box popping up?
Use the parameters collection in the report object.
VB Code:
Dim crxApp As CRAXDRT.Application Dim oReport As CRAXDRT.Report Set crxApp = New CRAXDRT.Application Set oReport = crxApp.OpenReport(App.Path & "\MyReport", 1) oReport.ParameterFields.Item(1).ClearCurrentValueAndRange oReport.ParameterFields.Item(1).AddCurrentValue CStr(oRs!Name) '... '...
thanks Rob...I was also able to use the following code:
VB Code:
rpt.SetParameterValue("begindate", tranPeriod)