开发环境 VS2010+ CRforVS_13_0_7(水晶报表)
已实现的功能,批量导出报表为单个PDF文件,代码见如下:
public bool ExportToPDF(string ReportFile, object ReportDataSource, string PDFFileName)
{
try
{
ReportDoc.Load(ReportFile);
ReportDoc.SetDataSource(ReportDataSource);
FileOPS.DiskFileName = PDFFileName;
ExOPS = ReportDoc.ExportOptions;
ExOPS.ExportDestinationOptions = FileOPS;
ExOPS.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
ExOPS.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
ReportDoc.Export();
return true;
}
catch
{
return false;
}
}
调用方法:
ExportToPDF(
Server.MapPath("../CheckReport/Turbine/GuanBanReport.rpt"),
ds.Tables["CITP_TURBINEGUANBAN"],
"C://inetpub//wwwroot//file//GuanBanReport.pdf"
);
求使用iTextSharp组件合成多个PDF为一个报告(PDF文件)的功能代码!
能有实例源码参考的最好!谢谢!