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

Change Page Numbers

edited February 2005 in RAP
Hi ,
I need to be able to set the first page number of a report.


Ex: on a Report with 3 pages i can set the first as page 2 .
So it would print 2,3,4 as page numbers.
Is it possible just using RAP or , do i have to use Delphi to do that?
Thanks anyway.

Comments

  • edited February 2005
    Hi Fabio,

    Try using a TppVariable and it its OnCalc event set its Value equal to
    Report.PageNo + 1. You could probably do some fancy string building if you
    want the page description :).

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2005
    Hi Nico,
    But how do i ask the first page number to the user?Trick hein!!
    Thats my problem, the user has to be able to set the first page number every
    time he open the report.
    Today i have a Delphi form to ask the user the first page number, then i
    call the report seting the page number by code.
    But i?d like to know if its possible to do that just using RAP.
    Thanks in advance.

  • edited February 2005
    Hi Fabio,

    You can use Report Parameters to get the first number from your users. This
    would consist of creating a report parameter (see the TppParameter topic in
    the ReportBuilder help), then inserting the value your users give you in the
    form into the Value property of the parameter. Finally in RAP accessing
    that value and using it to display the page numbers. In RAP, accessing a
    parameter might look like the following...

    lPageNo := Report.Parameters['MyParameter'];

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2005
    Hi Nico,
    I took i look inside Rap and i was able to create a parameter like this
    report.parameters.add('MyParameter',dtInteger,1);
    and then
    lPageNo := Report.Parameters['MyParameter'];

    But i still need to use a Delphi form as Dialog to get the value.
    Is it right?
    I could not find any other way to prompt the user for the value.
    Regards..


  • edited February 2005
    Hi Fabio,

    It is possible to create forms in RAP to be used for user input. See RAP
    Demo 35 located in the \RBuilder\Demos\0. RAP\1. Main\... directory.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2005
    Thanks Nico.

This discussion has been closed.