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

Refresh CR in VBA (AS400)

Status
Not open for further replies.

AzimuthX

Programmer
Jun 29, 2004
8
CA
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top