Discussion:
Page N of N pages in a code-based rpt
(too old to reply)
Clay Shannon
2007-01-19 23:56:00 UTC
Permalink
I want to add the "Page N of N pages" to a code-based report. IOW, something
like this (pseudocode):

procedure TClientDM.RvSystemPrint(Sender: TObject);
begin
with Sender as TBaseReport do begin
SetFont('Verdana', 16);
Bold := True;
GoToXY(1,1);
Print('Old Yeller, Come Back Yeller, Best Doggone Dog in the West');
Print(Format('Page %d of %d', [Report.CurrentPage, Report.TotalPages]));
<-- No worky!
...
end;

Anybody know how to do that?
--
Check out my books here: http://www.lulu.com/blackbirdcraven
and/or read about "Zany Warble" here: http://funniestnovelever.blogspot.com/
Eldon Lewis
2007-01-20 00:28:56 UTC
Permalink
Clay,

The correct way to do it is like this:

PrintRight(Macro(midCurrentPage) + ' of ' + Macro(midTotalPages), 8.0);

Eldon Lewis
Nevrona Designs
Post by Clay Shannon
I want to add the "Page N of N pages" to a code-based report. IOW, something
procedure TClientDM.RvSystemPrint(Sender: TObject);
begin
with Sender as TBaseReport do begin
SetFont('Verdana', 16);
Bold := True;
GoToXY(1,1);
Print('Old Yeller, Come Back Yeller, Best Doggone Dog in the West');
Print(Format('Page %d of %d', [Report.CurrentPage,
Report.TotalPages])); <-- No worky!
...
end;
Anybody know how to do that?
--
Check out my books here: http://www.lulu.com/blackbirdcraven
http://funniestnovelever.blogspot.com/
Loading...