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

Clearing the Viewer

edited September 2003 in General
I have a form with a ppViewer, getting data from a ClientDataSet.
This form prompts the user for dates initially and on a button. If there
are no records for the dates requested initially, the viewer displays a
blank paper. If the user requests different dates, they will get the
records. But if the user makes a request where there are no records I
would like to clear the viewer of previous data. What I am getting are
the last good records still displayed. I assume the ClientDataSet no
longer has those records, but they are an image on the viewer, which is
actually a panel. I just don't see how to clear it.

Comments

  • edited September 2003
    Hi Patrick,

    Try calling Viewer.Reset to clear out the report currently displayed.
    Calling this should give you a blank report page. Also check out the
    Report.NoDataBehavior to define what you would like to happen when there is
    no data in your dataset.

    --
    Best Regards,

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