多个文档,以我的理解就是多次合并您需要重复添加将之前已合并的文件,添加到新生成的reportDocument之后或之前:
- GrapeCity.ActiveReports.Document.PageDocument reportDocument = new GrapeCity.ActiveReports.Document.PageDocument(report);
- GrapeCity.ActiveReports.Export.Pdf.Page.Settings pdfSetting = new GrapeCity.ActiveReports.Export.Pdf.Page.Settings();
- GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension pdfRenderingExtension = new GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension();
- pdfSetting.DocumentToAddAfterReport = p1;
- FileInfo myfile = new FileInfo(p4);
- GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider outputProvider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(myfile.Directory, myfile.Name);
- reportDocument.Render(pdfRenderingExtension, outputProvider, pdfSetting);
-
- GrapeCity.ActiveReports.Document.PageDocument reportDocument1 = new GrapeCity.ActiveReports.Document.PageDocument(report);
- GrapeCity.ActiveReports.Export.Pdf.Page.Settings pdfSetting1 = new GrapeCity.ActiveReports.Export.Pdf.Page.Settings();
- GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension pdfRenderingExtension1 = new GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension();
- pdfSetting1.DocumentToAddAfterReport = p4;
-
- FileInfo myfile1 = new FileInfo(p5);
- GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider outputProvider1 = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(myfile1.Directory, myfile1.Name);
- reportDocument1.Render(pdfRenderingExtension1, outputProvider1, pdfSetting1);
- reportDocument1.Dispose();
复制代码
|