Dim crxReport
Dim crxApplication
Set crxReport = Nothing
Set crxApplication = New craxdrt.Application
Set crxReport = New craxdrt.Report
Set crxReport = crxApplication.OpenReport("path.rpt")
crxReport.Database.LogOnServer "pdsodbc.dll", "AS400 SYSTEM 2", "AS400HOST", "user", "pass"
crxReport.ParameterFields.GetItemByName("servicedt").AddCurrentRange (20040601), (20040631), 3
Me!cviewer.ReportSource = crxReport
Me!cviewer.ViewReport
I get an error "Server has not yet been opened". Any ideas? This method works with another crystal report.
Dim crxApplication
Set crxReport = Nothing
Set crxApplication = New craxdrt.Application
Set crxReport = New craxdrt.Report
Set crxReport = crxApplication.OpenReport("path.rpt")
crxReport.Database.LogOnServer "pdsodbc.dll", "AS400 SYSTEM 2", "AS400HOST", "user", "pass"
crxReport.ParameterFields.GetItemByName("servicedt").AddCurrentRange (20040601), (20040631), 3
Me!cviewer.ReportSource = crxReport
Me!cviewer.ViewReport
I get an error "Server has not yet been opened". Any ideas? This method works with another crystal report.