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

Refreshing a query's data

edited August 2006 in General
I am using Delphi v5, DBISAM v4.24 and REport Builder Professional 7.04.

I have a report based on a query:
- SELECT * FROM TABLEA

I want to perform the following actions.

1. Print the report based on the query.
2. Edit and post a record to TABLEA.
3. Print the report based on the query.

What steps do I need to perform to refresh the query so that the updated
record appears in the second report?

Thank you . . .



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited August 2006

    Close the query and re-open it.

    Try something like this...

    if myReport.DataPipeline is TppDBPipeline then
    begin
    lDBPipeline := TppDBPipeline(myReport.DataPipeline);
    lDBPipeline.DataSource.DataSet.Close;
    lDBPipeline.DataSource.DataSet.Open;
    end;

    Calling DataSet.Refresh might work also...



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2006
    Thank you!!! . . . . it works . . .

    I had been looking for an appropriate event to place the code instead of
    placing the code before the Print method.

    Thank you





    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.