TppViewer BeginUpdate
Hello,
Is there any kind of "ppViewer.BeginUpdate / EndUpdate" to lock TppViewer
from updating?
We use ppViewer to show several reports and navigate continuously using
Next/Prior page or GotoPage.
When we reach the Last/First page of the current report, we switch to next
report and set page.
Here is the code.
ppViewer.Report := AReport;
AReport.Reset;
AReport.PrintToDevices;
ppViewer.GotoPage(APage);
There is a problem when we go from last to previous page and need to switch
the report.
AReport.PrintToDevices;
ppViewer.GotoPage(APage);
These two operations both update ppViewer, so initially it will show first
page (after AReport.PrintToDevices;)
and then other page (GoToPage update). For complicated reports GoToPage can
take some time.
Is there any kind of "ppViewer.BeginUpdate / EndUpdate" to lock TppViewer
from updating and make something like:
ppViewer.BeginUpdate;
try
ppViewer.Report := AReport;
AReport.Reset;
AReport.PrintToDevices;
ppViewer.GotoPage(APage);
finally
ppViewer.EndUpdate;
end;
Best regards,
Alex.
Is there any kind of "ppViewer.BeginUpdate / EndUpdate" to lock TppViewer
from updating?
We use ppViewer to show several reports and navigate continuously using
Next/Prior page or GotoPage.
When we reach the Last/First page of the current report, we switch to next
report and set page.
Here is the code.
ppViewer.Report := AReport;
AReport.Reset;
AReport.PrintToDevices;
ppViewer.GotoPage(APage);
There is a problem when we go from last to previous page and need to switch
the report.
AReport.PrintToDevices;
ppViewer.GotoPage(APage);
These two operations both update ppViewer, so initially it will show first
page (after AReport.PrintToDevices;)
and then other page (GoToPage update). For complicated reports GoToPage can
take some time.
Is there any kind of "ppViewer.BeginUpdate / EndUpdate" to lock TppViewer
from updating and make something like:
ppViewer.BeginUpdate;
try
ppViewer.Report := AReport;
AReport.Reset;
AReport.PrintToDevices;
ppViewer.GotoPage(APage);
finally
ppViewer.EndUpdate;
end;
Best regards,
Alex.
This discussion has been closed.
Comments
Thanks for the further information about your requirements. I suggest
trying to use the TppViewer.OnEndGenerate event to know when the
threaded page cache has finished processing pages. Try placing the
GotoPage call in this event to provide a logical separation between the
print command and navigation.
Note that the threaded page cache by default will only generate the
first 100 pages. If you would like it to generate all pages, set the
Viewer.PageIncrement to 0.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com