Hey everybody,
I was using Crystal Report control in VB6 applications which allows to export to PDF provided that DLLs are installed on the client machines or the server the applications runs from
I need to be able to do it from code and that is the one I am trying to use:
Set appl = New CRAXDRT.Application
Dim rep As CRAXDRT.Report
Dim crxTable As CRAXDRT.DatabaseTable
Set rep = appl.OpenReport(CrystalReport1.ReportFileName, 1)
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.ExportOptions.DestinationType = 1
rep.ExportOptions.DiskFileName = "c:\Test.PDF"
rep.Export False
It all works fine(I check in Immediate Window it finds the report with all the data) till the last line
There it gives an error message:
2147192184(80047288)
"Server has not yet been opened"
I have tried different approaches including using
LogOnToServer method:
rep.Database.LogOnServer "P2SSQL.DLL", "S600Q24", Mydb,MyUserName,MyPassword
It logs on to the server but the error still occurs on Export line
Any ideas on that will be greatly appreciated.
Cheers!
I was using Crystal Report control in VB6 applications which allows to export to PDF provided that DLLs are installed on the client machines or the server the applications runs from
I need to be able to do it from code and that is the one I am trying to use:
Set appl = New CRAXDRT.Application
Dim rep As CRAXDRT.Report
Dim crxTable As CRAXDRT.DatabaseTable
Set rep = appl.OpenReport(CrystalReport1.ReportFileName, 1)
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.ExportOptions.DestinationType = 1
rep.ExportOptions.DiskFileName = "c:\Test.PDF"
rep.Export False
It all works fine(I check in Immediate Window it finds the report with all the data) till the last line
There it gives an error message:
2147192184(80047288)
"Server has not yet been opened"
I have tried different approaches including using
LogOnToServer method:
rep.Database.LogOnServer "P2SSQL.DLL", "S600Q24", Mydb,MyUserName,MyPassword
It logs on to the server but the error still occurs on Export line
Any ideas on that will be greatly appreciated.
Cheers!