IanNav
Programmer
- Feb 26, 2001
- 79
Hi,
I am trying to export a report without using the designer, or any viewers on my form...
I simply want to export it out to PDF format.
It gives me the Error Message (Server has not yet been opened)
I must be missing out something... but what??
I would apriacate some help, this is getting quite urgent
Thanks
Ian
(please see below my entire code for trying to export a report)
Dim CrystalApp As New CRAXDRT.Application
Public Report As CRAXDRT.Report
Private Sub Form_load()
Dim ExportOpts As CRAXDRT.ExportOptions
Set Report = CrystalApp.OpenReport("c:\Report3b.rpt", 1)
Report.Database.LogOnServer "pdsodbc.dll", "testdb"
Set ExportOpts = Report.ExportOptions
With ExportOpts
.FormatType = crEFTPortableDocFormat
.DestinationType = crEDTDiskFile
.DiskFileName = "C:\windows\desktop\ExpTest.pdf"
End With
Report.Export False
End Sub
I am trying to export a report without using the designer, or any viewers on my form...
I simply want to export it out to PDF format.
It gives me the Error Message (Server has not yet been opened)
I must be missing out something... but what??
I would apriacate some help, this is getting quite urgent
Thanks
Ian
(please see below my entire code for trying to export a report)
Dim CrystalApp As New CRAXDRT.Application
Public Report As CRAXDRT.Report
Private Sub Form_load()
Dim ExportOpts As CRAXDRT.ExportOptions
Set Report = CrystalApp.OpenReport("c:\Report3b.rpt", 1)
Report.Database.LogOnServer "pdsodbc.dll", "testdb"
Set ExportOpts = Report.ExportOptions
With ExportOpts
.FormatType = crEFTPortableDocFormat
.DestinationType = crEDTDiskFile
.DiskFileName = "C:\windows\desktop\ExpTest.pdf"
End With
Report.Export False
End Sub