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

NewBie: Progmatically changing/refreshing page preiew

edited April 2002 in General
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.

Thanx in Advance,
Terry Fehr

Comments

  • edited April 2002
    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:

    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

This discussion has been closed.