Check out demo 123 located in the \RBuilder\Demos\1. Reports\... directory (dm0123.pas). This example shows how to send individual pages to the device at will.
Ok I've changed demo 124 instead to print each page to a individual RAF file (see code below).
Now how can I detect the last page and stop printing ? Demo 124 prints 30 pages but I can request pages 31 and up w/o exceptions. It prints the last page again and again. ppReport.AbsolutePageCount is useless since I allways request a single page.
procedure Tfrm0124.Button1Click(Sender: TObject); var oDevice: TppArchiveDevice; iPageNo: Integer; begin oDevice := TppArchiveDevice.Create(Self); oDevice.Publisher := ppReport.Publisher; oDevice.PageSetting := psSinglePage; for iPageNo := 1 to 30 do // need to figure out the real page count begin oDevice.PageRequested := iPageNo; oDevice.FileName := Format('page_%d.raf', [iPageNo]); ppReport.PrintToDevices; end; end;
Comments
Check out demo 123 located in the \RBuilder\Demos\1. Reports\... directory
(dm0123.pas). This example shows how to send individual pages to the device
at will.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ok, I'll try to adapt the code to send individual pages as RAF.
Thanks.
---
Fabio Lindner
If you set your report to a psTwoPass, you will be able to use the
AbsolutePageCount to find the total number of pages in your report.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ok I've changed demo 124 instead to print each page to a individual RAF file
(see code below).
Now how can I detect the last page and stop printing ? Demo 124 prints 30
pages but I can request pages 31 and up w/o exceptions. It prints the last
page again and again. ppReport.AbsolutePageCount is useless since I allways
request a single page.
procedure Tfrm0124.Button1Click(Sender: TObject);
var
oDevice: TppArchiveDevice;
iPageNo: Integer;
begin
oDevice := TppArchiveDevice.Create(Self);
oDevice.Publisher := ppReport.Publisher;
oDevice.PageSetting := psSinglePage;
for iPageNo := 1 to 30 do // need to figure out the real page count
begin
oDevice.PageRequested := iPageNo;
oDevice.FileName := Format('page_%d.raf', [iPageNo]);
ppReport.PrintToDevices;
end;
end;
Any idea ?
---
Fabio Lindner
---
Fabio Lindner