Section report and duplex printing

Posted by: lmclaughlin on 3 March 2022, 3:14 am EST

  • Posted 3 March 2022, 3:14 am EST

    I have a section report with all static text and dynamic fields in the detail section of the report. I need to add static text only and when printed will print on the back of the page. What is the best approach for this.

    I've already tried adding a page break right before the page footer and adding the text underneath the break, it kinda worked but messed up other parts of the report.

    Any sugesstions

    Thanks

    Louie
  • Marked as Answer

    Replied 3 March 2022, 5:22 pm EST

    Hi Louie,
    For this what you can do is add pages in the report.Document.Pages at alternate positions once the report is rendered.
    Please refer to the following lines of code for reference.
    SectionReport1 report = new SectionReport1();
    report.Run();
    var blankPage = new GrapeCity.ActiveReports.Document.Section.Page
    {
    Width = report.PageSettings.PaperWidth,
    Height = report.PageSettings.PaperHeight
    };
    blankPage.DrawText("Static Text Place Holder", 3, 5, 3, 1);

    for (int i = report.Document.Pages.Count - 1; i >= 0; i--)
    {
    report.Document.Pages.Insert(i + 1, blankPage);
    }
    viewer1.LoadDocument(report.Document);

    Along with this, I have also shared a sample application.

    SectionReport BackPrint.zip
  • Replied 4 March 2022, 4:52 am EST

    Thanks, that worked
Need extra support?

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

Learn More

Forum Channels