Is it possible to export Crystal Reports 8.5 output generated through vb6.0 to PDF format ?
I have Acrobat Adobe Professional 7.0 installed on my machine.
Thanks in Advance
Printable View
Is it possible to export Crystal Reports 8.5 output generated through vb6.0 to PDF format ?
I have Acrobat Adobe Professional 7.0 installed on my machine.
Thanks in Advance
I do it all the time with Crystal 9. I can't remember if I did it when I was running 8.5. Sorry.
Hello Pasvorto:
Could you post sample code of how you did it in Visual Basic and Crystal Reports 9.0
I use a program called CutePDF, which acts like a printer on the system. You can just direct the output to the CutePDF printer, and it will prompt you for a filename to write to.
This is what I use.
VB Code:
Private Sub ExportReportToPDF(ReportObject As CRAXDRT.Report, Byval FileName As String, Byval ReportTitle As String) Dim objExportOptions As CRAXDRT.ExportOptions ReportObject.ReportTitle = ReportTitle With ReportObject .EnableParameterPrompting = False .MorePrintEngineErrorMessages = True End With Set objExportOptions = ReportObject.ExportOptions With objExportOptions .DestinationType = crEDTDiskFile .DiskFileName = FileName .FormatType = crEFTPortableDocFormat .PDFExportAllPages = True End With ReportObject.Export False End Sub Private Sub Command1_Click() Dim objCrystal As CRAXDRT.Application Dim objReport As CRAXDRT.Report Set objCrystal = New CRAXDRT.Application Set objReport = objCrystal.OpenReport(ReportFileName, 1) '...code to set report parameters, login information etc... ExportReportToPDF objReport, "M:\Testing\Beds.pdf", "Beds Held" End Sub
Thanks. I will be testing the code using Crystal Reports 8.5. Hopefully should work.
I do have the option of printing the pdf files using CutePDF printer module but the pdf files that are generated have different font and file sizes which causes issue when distributing the pdf files to users. (I have already used the CutePDF printer to generate pdf files using Crystal Reports 6.0 programmatically).
I've had great luck with PDF995. Much the same as CutePDF. Its free with popups, but only costs...get this...$9.95 to get rid of them. It has lots of features, such as auto-saving, if your program is automated.
Go with Brucevde's code since it is available in CR to directly and freely export to pdf, xls, etc.
Note: when/if you distribute your app you need to include the dll support files for this. You can look up each file that is needed in the runtime.hlp file. ;)
hello RobDog888,
I created a setup for my application. My application requires the use of crystal reports. Sometime I do have to export report files to pdf format. But when I compile those reports I cant export them. I guess I have to include the runtime files in order to be able to export. I referred the run time help and found a couple of files that have to be included in the run time. These are:
UXFCR.DLL
UXFDIF.DLL
UXFDOC.DLL
WORDDOS.XTD
Word for DOS
WPERFECT.XTD
WordPerfect
UXFHTML.DLL
UXFODBC.DLL
UXFQP.DLL
UXFREC.DLL
UXFRTF.DLL
UXFSEPV.DLL
UXFTEXT.DLL
UXFWKS.DLL
UXFWORDW.DLL
UXFXLS.DLL
LF*W.DLL
LTKRN60W.DLL
LTFIL60W.DLL
I wonder if there are any other additional files that have to be included in the set up project...
Could you please help...
Thx
Look at this thread. Download the file in Post #4.