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博客 ” ,链接:https://blog.itpub.net/12685933/viewspace-136154/ ,如需转载,请注明出处,否则将追究法律责任。