如何利用Crystal Report程序来生成PDF版本?(How to generate PDF version of Crystal Report programmatically?)
ReportDocument O_Report=new ReportDocument();
ExportOptions exportOpts = new ExportOptions();
PdfRtfWordFormatOptions pdfFormatOpts = new PdfRtfWordFormatOptions ();
DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();
exportOpts = O_Report.ExportOptions;
// 设置PDF格式
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;
exportOpts.FormatOptions = pdfFormatOpts;
// 设置文件选项和导出
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
diskOpts.DiskFileName = "C://Trial.pdf"; //设置PDF导出路径
exportOpts.DestinationOptions = diskOpts;
O_Report.Export ();