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

On Startpage event

edited December 2005 in General
Hello
I want to increase the waybill number for every report page.. this code
increasing the waybill number at once.. When I try to explore within the
pages, number is continue to increase .. I want to do that only once per I
run the report.

is there an alternative event for Start Page? Or Whats your suggestion ?
Thanks


procedure TForm7.ppReport1StartPage(Sender: TObject);
begin
Ztable2.close;
Ztable2.open;
Ztable2.Edit;
ZTable2NO.Value:=ztable2no.Value +1;
ZTable2.Post;
Ztable2.close;
Ztable2.open;
end;

Comments

  • edited December 2005
    Hi,

    Unfortunately there are not events that will fire once per page when
    navigating back and forth. I would recommend setting up a list of "visited
    pages" in you application. Then before the OnStartPage event fires, compare
    the current page (Report.AbsolutePageNo) with the saved values in the list.
    If there is a match, skip the event code below.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2005
    I think it wont work cause everytime I am generating different report data
    but Page number will be same.. So ???
    I am waiting your alternative solutions..

    Thanks



  • edited December 2005
    Hi,

    In this case, an event that only fires once per page would not solve the
    problem either. I'm a bit unclear about what you would like to happen.

    1. Every time a new page is visited for the first time - increase the
    waybill number once.
    2. Every time a page is visited with new data - increase the waybill number.

    Is this correct?

    --
    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.