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

Initial page number attribution

edited November 2005 in General
Hi, When printing a report, I would like to number first report page NOT
as 1, but with some other value (of course, next report pages would get
page numbers based on this initial value).
How can I do it?
Thanks.



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited November 2005
    Hi,

    Instead of using a TppSystemVariable, try placing a TppVariable where you
    would like the page number to be. Then set the value of the variable based
    on the Report.PageNo value. For instance, if you wanted your report to
    start on page 7, you could do the following...

    procedure TForm1.ppFooterBand1BeforePrint(Sender: TObject);
    begin
    ppVariable1.Value := ppReport1.PageNo + 6;
    end;

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2005
    Thank you, I implemented following this track and it promises to be a
    good solution.
    Since I will put a TppVariable in place of TppSystemVariable, I want to
    give to the user the possibilitie to choose the format between:
    Page n
    or
    Page n of t
    (n=page number, t= total page number)
    If the user chooses first format, the report should traverse the data
    only once, but traverse twice is necessary in case of second format.
    So, to accomplish this goal, I've tried to set PassSetting property with
    these lines of code:
    ppReportRaz.PassSetting := psOnePass;
    if (StrToInt(Editrel_page.Text) > 1) then
    ppReportRazao.PassSetting := psTwoPass;
    Unfortunately, I got these error messages:
    Undeclared identifier: 'psOnePass'
    Undeclared identifier: 'psTwoPass'
    What should I do?
    Regards,
    Roberto Freitas

    you
    based
    NOT



    --- posted by geoForum on http://delphi.newswhat.com
  • edited November 2005
    Hi Roberto,

    You need to add ppTypes to your uses clause.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2005
    Thank you for all information you give me: I've reached my goal with
    complete success.
    Roberto

    with
    get



    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.