Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21100

vb6 , crystal report 7 export to pdf

$
0
0
I want to export my crystal report 7 to pdf without having to open the crystal report viewer. I wanted some pointers or advice on how I could go about it. I am using the below code but it is giving me an error in the first line it says user defined type not defined , is there anyone that knows how I can go about this.

Code:

Dim app As Application
Dim report As report
Set app = CreateObject("Crystal.CRPE.Application")
Set report = app.OpenReport("C:\TEMP\ExportTest.rpt")
report.ExportOptions.DestinationType = 1 ' export to disk
report.ExportOptions.FormatType = 4
report.ExportOptions.DiskFileName = "C:/TEMP/PrintTest.doc"
report.Export False


Viewing all articles
Browse latest Browse all 21100

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>