Merging PageReports - header/footers are missing

Posted by: koreilly on 16 November 2022, 2:17 am EST

    • Post Options:
    • Link

    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].

  • Posted 16 November 2022, 7:55 pm EST

    Hi Don,

    Unfortunately, The PageHeader and PageFooter are not rendered when rendering a report using a ReportCombiner or SubReport. This is by design.

    However, we have added a new report type to tackle this issue in the latest ActiveReports 16 version 16.3.1 called ‘RDL-Multi Section Report’ which contains multiple RDL reports each with its own PageHeader/Footer.

    You can add all the reports you want to merge in this along with their respective Header/Footer and they will render as expected.

    Please find attached a sample for the same.

    You may download ActiveReports v16.3.1. from here:

    https://www.grapecity.com/activereportsnet/download

    Regards,

    Anand

    RdlMultiSectionReportApplication1.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels