|
-
Aug 25th, 2005, 02:48 PM
#1
Thread Starter
New Member
Export to PDF from VB6.0 code & Cyrstal Reports 8.5
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
-
Aug 25th, 2005, 02:50 PM
#2
PowerPoster
Re: Export to PDF from VB6.0 code & Cyrstal Reports 8.5
I do it all the time with Crystal 9. I can't remember if I did it when I was running 8.5. Sorry.
-
Aug 25th, 2005, 02:59 PM
#3
Thread Starter
New Member
Re: Export to PDF from VB6.0 code & Cyrstal Reports 8.5
Hello Pasvorto:
Could you post sample code of how you did it in Visual Basic and Crystal Reports 9.0
-
Aug 25th, 2005, 03:09 PM
#4
Re: Export to PDF from VB6.0 code & Cyrstal Reports 8.5
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.
-
Aug 25th, 2005, 03:11 PM
#5
Re: Export to PDF from VB6.0 code & Cyrstal Reports 8.5
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
-
Aug 25th, 2005, 03:37 PM
#6
Thread Starter
New Member
Re: Export to PDF from VB6.0 code & Cyrstal Reports 8.5
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).
Last edited by AncientCoder; Aug 25th, 2005 at 03:37 PM.
Reason: typo error
-
Aug 25th, 2005, 04:04 PM
#7
New Member
Re: Export to PDF from VB6.0 code & Cyrstal Reports 8.5
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.
-
Aug 25th, 2005, 05:16 PM
#8
Re: Export to PDF from VB6.0 code & Cyrstal Reports 8.5
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 11th, 2006, 06:21 AM
#9
New Member
Re: Export to PDF from VB6.0 code & Cyrstal Reports 8.5
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
-
Aug 11th, 2006, 09:52 AM
#10
Re: Export to PDF from VB6.0 code & Cyrstal Reports 8.5
Look at this thread. Download the file in Post #4.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|