page number on overflow pages
Hello,
How can I put page number (except using TppSystemVariable) on
overflow pages?
For example, I have 5 pages in my report. The last 3 pages are
generated from overflow page. They will be counted as 1, 2, 3, but not
3, 4, 5. The whole report page will be order as 1, 2 and 1, 2, 3.
regards,
Meixi
How can I put page number (except using TppSystemVariable) on
overflow pages?
For example, I have 5 pages in my report. The last 3 pages are
generated from overflow page. They will be counted as 1, 2, 3, but not
3, 4, 5. The whole report page will be order as 1, 2 and 1, 2, 3.
regards,
Meixi
This discussion has been closed.
Comments
vtPageNo value: 1, 2, 3, 4, 5. How can I change it as 1, 2, 1, 2, 3?
regards,
Meixi
page no, and then update it at the end of the page, if you've encountered
your overflow pages, as shown in the example code below. Although, I'm not
sure what you mean by overflow pages. Is this a summary subreport? You can
reset page numbering automatically with subreports. See the #51-51 main
reports demo and the Subreport.ResetPageNo property.
uses
ppDrwCmd;
...
private
FPageNo: TppDrawText;
FCounter: Integer;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
FPageNo := nil;
FCounter := 0;
ppReport1.Print;
end;
procedure TForm1.ppSystemVariable1DrawCommandCreate(Sender, aDrawCommand:
TObject);
begin
FPageNo := TppDrawText(aDrawCommand);
end;
procedure TForm1.ppReport1EndPage(Sender: TObject);
begin
if (FPageNo.Text <> '') and (StrToInt(FPageNo.Text) >= 3) then
begin
Inc(FCounter);
FPageNo.Text := IntToStr(FCounter);
end;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Thanks for reply!
I have a record with Memo Field in my subreport. when the message in the
Memo Field more then a page, it will overflow to next page. I need put page
number on the overflow page.
Regards,
Meixi
page numbers to be 1,2,3. If the last page memo overflows on pages 3,4,5,
then you want the page numbering to be 1,2,1,2,3. Here is an example which
manually calculates the page numbers, based on an overflowing memo in the
detail band. I don't know how close this example is to what you are asking,
but it should give some insight on a place to start.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
http://www.digital-metaphors.com/tips/CustomPageNumbering.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Thank you very much!
I follow the idea last time you gave to me about "Use the SystemVariable's
CreateDrawCommand event to store a handle to the page no, and then update it at
the end of the page..." The problem has been solved. Since I only used idea
"update System Variable value", I like to try the idea what you just gave to me
too.
regards,
Meixi