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

How do I refresh the data on my preview form?

edited March 2004 in General
I've got my own preview form and I've added a button
to refresh the report. What should I do to refresh the data?

thanks

Comments

  • edited March 2004
    Hi,

    Try calling Report.Reset after you update your dataset.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    well, how do I update the dataset then? I've already called

    TppReport(MYViewer.Report).reset;
    MyViewer.RegenerateReport;

    and it still not re-fetching the new data.

    thanks

  • edited March 2004
    Hi Deck,

    Refreshing the report at runtime from the preview is very similar to using
    the AutoSearch feature. Once your data has been changed in your database,
    be sure your datasets are active, then reset the Report and the
    Report.Engine in that order. Then you can call RegenerateReport and the new
    data should show up. Something like the following...

    ppReport1.Reset;
    ppReport1.Engine.Reset;
    TppViewer(ppReport1.PreviewForm.Viewer).RegenerateReport;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.