Adding an empty page
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
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
This discussion has been closed.
Comments
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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):
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);
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com