Posted 16 November 2022, 2:17 am EST
I have 2 RDL reports that I am trying to merge using the ReportCombiner but the PageHeader & PageFooters are not rendering.
[code]
var combiner = new ReportCombiner();
var rpt1 = new PageReport();
var rpt2 = new PageReport();
rpt1.Load(new FileInfo(_webHostEnvironment.ContentRootPath + @“\Reports\Receipt1.rdlx”));
rpt1.Report.DataSources[0].ConnectionProperties.ConnectString = _appSettings.Connection;
rpt2.Load(new FileInfo(_webHostEnvironment.ContentRootPath + @“\Reports\Receipt2.rdlx”));
rpt2.Report.DataSources[0].ConnectionProperties.ConnectString = _appSettings.Connection;
combiner.AddReport(rpt1);
combiner.AddReport(rpt2);
var filename = “Receipt.pdf”;
var pdfRe = new GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension();
var provider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(new DirectoryInfo(_webHostEnvironment.ContentRootPath + @"\wwwroot\uploads\temp"), filename);
combiner.BuildReport().Document.Render(pdfRe, provider);
[/code].