On Startpage event
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;
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;
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
but Page number will be same.. So ???
I am waiting your alternative solutions..
Thanks
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com