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