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

Set starting page number

edited October 2007 in General
Is there a way to set the first/starting page number?

I have a subreport in between two other subreports that
is used to place a tab from a different printer bin. I do not
want the tab to have a page number though.

Subreport 1 Pages 1 - 3
Tab Subreport
Subreport 2 Pages 4 - 10


Jim

Comments

  • edited October 2007
    Hi Jim,

    In order to take control of the page number displayed, you will need to take
    manual control using a TppVariable rather than a system variable. Inside
    the OnCalc of a TppVariable, you will need to use the Report.PageNo,
    Report.PageCount, Report.AbsolutePageNo and Report.AbsolutePageCount
    properties to assign the proper value relative to the actual page number.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2007
    I tried using the OnGetText event but this does not seem
    to work for system variables. Should it?

    I have hundreds of these reports, so I really don't want to change
    them all. I thought I could override the OnGetText at runtime
    to display any page number I wanted.

    Jim
  • edited October 2007
    >I tried using the OnGetText event but this does not seem

    Yes, using the OnGetText of a SystemVariable will allow you to alter the
    default text displayed. In my quick testing the following code worked as
    expected...

    procedure TForm1.ppSystemVariable1GetText(Sender: TObject; var Text:
    string);
    begin
    Text := IntToStr(ppReport1.PageNo + 2);
    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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