Skip to Content
avatar image
Former Member

Stale Data When Viewing Reports

Hi there,

I'm using Crystal Reports 2005 in Visual Studio .NET 2005, and have a Windows Forms application that displays a Crystal Report using the Report Viewer control, and pulling data from an access database.

I'm running into an issue where the report I'm trying to display seems to be displaying stale data. My application is saving the information correctly to the database, but occasionally when the report is displayed in the report viewer control, it contains the data from prior to the updates being saved to the database. If I click the 'Refresh' button on the report viewer control, the updated data appears.

I've tried several different options -- calling Refresh() on the report object after instantiating it, calling 'RefreshReport()' on the Report Viewer control, making sure the report had the 'Save Data with report' option disabled, calling 'VerifyDatabase()', etc. All to no avail.

Anyone run into this issue before? Is there a setting that I'm just missing somewhere?

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 15, 2008 at 01:29 PM

    From your description, I believe your app is updating the Access database, then immediately calling Crystal reports.

    Sounds like the data being written to the database is not committed at the point your app is calling CR to retrieve the data. A quick test to see if this is the case, would be to place a, say 2 second delay just before you try to view the report. If this helps, there are Access APIs that you can use to ensure the data is committed before calling Crystal reports.

    Ludek

    Add comment
    10|10000 characters needed characters exceeded