本文介绍了将Crystal Reports导出为asp.net中的PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以将Crystal Reports导出为PDF文件
Export Crystal Reports to PDF file any body know help me
推荐答案
string FileName = "test.rpt";
string FullPath = Path.Combine("ReportFolder", FileName);
rptDoc.Load(Server.MapPath(FullPath));
rptDoc.SetDataSource(dt);
//Export to PDF
ExportOptions CrExportOptions;
DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
CrDiskFileDestinationOptions.DiskFileName = "D:/GeneratedPDF/PDFFileName.pdf";
CrExportOptions = rptDoc.ExportOptions;
CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
CrExportOptions.FormatOptions = CrFormatTypeOptions;
rptDoc.Export(CrExportOptions);
谢谢,:rose :: thumbsup:
Imdadhusen
Thanks,:rose::thumbsup:
Imdadhusen
这篇关于将Crystal Reports导出为asp.net中的PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!