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

Server has not yet been opened

Status
Not open for further replies.

Shazza

Technical User
Aug 21, 2000
38
0
0
NZ
I have a report written in CR 8.5 and I am running this via Visual Basic 6.0 using the RDC.

When I run the following code I get 'Server has not yet been opened' error message

oCrystal.LogOnServer "pdssql.dll", settings.Server, settings.Database, settings.Login, settings.Password

The report is based on a SQL database all I am trying to do is open the report and export to file.

Thanks in advance
 
Sorry, here is some more

rivate oCrystal As New CRAXDRT.Application
Private oReport As CRAXDRT.Report
Private oExportOptions As CRAXDRT.ExportOptions

Set oReport = oCrystal.OpenReport(settings.ReportPath)

oCrystal.LogOnServer "pdssql.dll", settings.Server, settings.Database, settings.Login, settings.Password

Set oExportOptions = oReport.ExportOptions
oExportOptions.DiskFileName = settings.Path & "\" & colClient(i) & ".pdf"
oExportOptions.FormatType = crEFTPortableDocFormat
oExportOptions.UseReportNumberFormat = True
oExportOptions.DestinationType = crEDTDiskFile

oReport.DisplayProgressDialog = False
oReport.Export False
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top