How do I refresh or change the current page of an open report preview from elsewhere in my program? I have looked for properties/methods to do this with no luck.
You'll have to regenerate the report and request that page again, if you have changed the dataset or changed the layout of the report and want the current page to reflect this.
If you are using the TppViewer component you can do something like this:
If you have a report with a default preview form, then you can get the viewer object with this call TppViewer(ppReport1.Previewform.Viewer); You'll need to add ppViewr to the uses clause.
Comments
have changed the dataset or changed the layout of the report and want the
current page to reflect this.
If you are using the TppViewer component you can do something like this:
liPage := ppViewer1.AbsolutePageNo;
ppViewer1.Reset;
ppViewer1.RegenerateReport;
ppViewer1.GotoPage(liPage);
If you have a report with a default preview form, then you can get the
viewer object with this call TppViewer(ppReport1.Previewform.Viewer);
You'll need to add ppViewr to the uses clause.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com