Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Adding an empty page

edited November 2012 in General
Hello,

I am composing complex reports to a single output with several

// here I want to export a blank page
for intIndex := 0 to AReport.Publisher.PageCount-1 do
ADevice.ReceivePage(AReport.Publisher.Pages[intIndex]);

sections. Now I need to print / export a blank page before this section.
What is the best pocedure to do this?

Thank you!

Michael

Comments

  • edited November 2012
    Hi Michael,

    Since you seem to be manually sending pages to the device, you could
    create an empty page object with the same PrinterSetup as the other
    pages in your report and receive it before entering the loop below.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2012
    Hello Nico,

    I tried this, but it didn't work:

    tmpPage := TppPage.Create(nil);
    try
    tmpPage.PrinterSetup.Assign(AReport.PrinterSetup);
    ADevice.ReceivePage(tmpPage);
    finally
    FreeAndNil(tmpPage);
    end;

    Do I miss something?

    Best regards,
    Michael


    Am 28.11.2012 16:36, schrieb Nico Cizik (Digital Metaphors):
  • edited November 2012
    Hi Michael,

    Looking at the ReceivePage code for TppDevice and TppPrinterDevice, you
    are going to want to make sure this is not a message page. Try setting
    Page.Final to True. Also give the page an AbsolutePageNo and assign its
    PageDef.

    lPage.Final := True;
    lPage.AbsolutePageNo := 1; // should not need this if psAll is used
    lPage.PageDef.Assign(aReport.Publisher.Pages[0].PageDef);

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.