Problems with crystal 8.5 and vbscript pdf export 
Author Message
 Problems with crystal 8.5 and vbscript pdf export

I have a report that I would like to export to pdf using a vb script.
Everything is working to export it to a word file (however the output
is not exactly WYSIWYG).  When I try and change the format type to
CREFTPORTABLEDOCFORMAT or 31, I get a message that the enum is
undefined.  However, if I remove the false from Export method and
manually select the PDF export option it works correctly.

Has anyone seen this before and/or was able to fix it.

Thanks in advance for any assistance.

/Steve

PS Here is the current code that I am using

' Constant Values
 Dim CREFTWORDFORWINDOWS
 Dim CREFTRICHTEXT
 Dim CREFTEXCEL21
 Dim CREFTEXCEL70
 Dim CREFTCRYSTALREPORT
 Dim CREFTPORTABLEDOCFORMAT
 Dim CREDTDISKFILE
 Dim CREDTMAILMAPI
 Dim EMFMIMETYPE
 CREFTWORDFORWINDOWS = 14
 CREFTRICHTEXT = 4
 CREFTEXCEL21 = 18
 CREFTEXCEL70 = 27
 CREFTCRYSTALREPORT = 1
 CREFTCRYSTALREPORT7 = 33
 CREFTPORTABLEDOCFORMAT = 31
 CREDTDISKFILE = 1
 CREDTMAILMAPI = 2
 crAllowPlaceHolders = 2
 crDelayTotalPageCountCalc = 1
 EMFMIMETYPe = "application/x-emf"
 EPFMIMETYPE = "application/x-epf"
 ETFMIMETYPE = "application/x-etf"

Set CRPE=CreateObject("Crystal.CRPE.Application")
Set Report=CRPE.OpenReport("d:\internalwww\reports\newparts.rpt")
Report.DiscardSavedData
Report.ExportOptions.DestinationType=CREDTMAILMAPI
Report.ExportOptions.DiskFileName="\\fileserver\kudu\production\inventory
control\crystal_reports\newparts.doc"

Report.ExportOptions.FormatType=31
'Report.ExportOptions.FormatType=CREFTPORTABLEDOCFORMAT
Report.ExportOptions.MailMessage="See attached"
Report.ExportOptions.MailSubject="New parts generated in the last day
as of " & Now()

Report.Export FALSE

Set report=nothing
Set CRPE=nothing



Sat, 17 Apr 2004 02:07:05 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem exporting PDF Files with Crystal Report 8.5

2. Problem using Crystal Report 8.5 to export PDF in Visual Basic 6.0

3. Export to PDF to stream? Crystal 8.5

4. Crystal Reports 8.5 PDF Export

5. Exporting To PDF, RTF using VB6 (SP4) Crystal 8.5

6. PDF export error in crystal 8.5 with windows 98

7. CR 8.5 Export to PDF perfromance problems etc

8. CR 8.5 export to PDF problem...HELP!

9. Export to PDF only from CRviewer (RDC 8.5 - VB 6.0)

10. CR 8.5 PDF export and VB

11. Print to PDF from Crystal 8.5 DSR

12. Crystal Reports 8.5/VB6 PDF bookmarks?

 

 
Powered by phpBB® Forum Software