ITPub博客

首页 > Linux操作系统 > Linux操作系统 > How to generate PDF version of Crystal Reports programmatically?

How to generate PDF version of Crystal Reports programmatically?

原创 Linux操作系统 作者:hireats 时间:2008-01-12 09:27:51 0 删除 编辑
ReportDocument O_Report=new ReportDocument();
ExportOptions exportOpts = new ExportOptions();
PdfRtfWordFormatOptions pdfFormatOpts = new PdfRtfWordFormatOptions ();
DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();

exportOpts = O_Report.ExportOptions;

// Set the PDF format options.                
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;
exportOpts.FormatOptions = pdfFormatOpts;

// Set the disk file options and export.
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
diskOpts.DiskFileName = "C://Trial.pdf"; // This is the path where the file will be saved                
exportOpts.DestinationOptions = diskOpts;

O_Report.Export ();

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12685933/viewspace-136154/,如需转载,请注明出处,否则将追究法律责任。

上一篇: DouDou Teach
请登录后发表评论 登录
全部评论

注册时间:2008-01-08

  • 博文量
    20
  • 访问量
    53145