Report / Database refresh

Hi,

I have application where I print from MS-Access database report using Fast Report.

When I print first time, the data is OK, if I close the report, then change something in the data and click again to print, the report always shows the old data (first time), if I close everything and run it again, the data is OK.

I checked if the data was saved in the database or not, it is, I think it's something related to cashing or refreshing of data.

Is there is any way I force Fast Report to reconnect again to the database and get the recent data?

Thanks,

Comments

  • edited 9:38PM
    Hello,

    Do you use application datasource (using report.RegisterData() call), or add a new datasource into the report (via "Data|Add Data Source..." menu)?
  • edited 9:38PM
    AlexTZ wrote: »
    Hello,

    Do you use application datasource (using report.RegisterData() call), or add a new datasource into the report (via "Data|Add Data Source..." menu)?

    I create DB from Fast Report (via "Data|Add Data Source..." menu)?
  • edited 9:38PM
    Yes, in this case the report uses cashed data. The preferred solution is to create a new instance of a report each time when you show it:

    using (Report report = new Report())
    {
    report.Load(...);
    report.RegisterData(...);
    report.Show();
    }
  • edited 9:38PM
    Great,

    I created new instance of a report each time when I show it, now the data is up to date with the report.

    Thank you very much,


Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.