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

Auto saved reports recovery

Hi,

I have recently updated ReportBuilder to version 19.03 in my Delphi Berlin environment. I am happy that RB has autosave feature but I am bit worried about the functioning. In past week or so, I have updated few reports and everything was done okay, no crashed and so on. But after every few starts of program using the debug mode in Delphi, the question with "Recover auto-saved report?" appears on startup. I am bit worried if this can happen when the application shall go to our customers (few hundreds of them) and such question should appear. Our technical support is already busy and I really don't want that they shall be bothered with this...
So the question is what triggered this notification; compiled application, delphi or something else? Just before I wrote this question I found rbuilder.ini as per help file and disabled AutoSave. Would be nice to have some other possibility to set these options.

Best regards,
Goran
Goran Brumen
Audax d.o.o.

Comments

  • Hi Goran,

    The AutoSave feature is commonly found in applications like MS Office. The latest Delphi versions also have AutoSave. (as does this forum.)

    RB AutoSave periodically saves the report layout to a temp file (it only does this when the report layout has been modified). If the Designer closes gracefully the temp file is deleted. If there is an app crash, an exception etc, the temp file remains. The next time the Designer is used, it checks for the presence of the temp file and conditionally prompts the user whether to recover the file.

    The RB AutoSave can be disabled either via RBuilder.ini or with the following code.

    ppDesigner1.Form.DesignControllers.DocumentController.AutoSave.Enabled := False;


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Hi mr. Moseley,

    thank You for this explanation. Unfortunatelly the matter is not resolved for me. I modified the rbuilder.ini file with AutoSave=0 and today it again asked me if I want to recover autosaved report. I started the application without debug mode and yes, before this, I was checking one report which was successfully saved, without any crash. I just checked the folder AppData... where the setting AutoSave in rbuilder.ini is still 0 and there is a Report_autosave.rtm with a length of 3,33 KB but I can't check the contents.
    Regarding the code, well, in my application there are few TppDesigners (less than 10) and much more TppReports. And the last report was opened with TppReport...

    Any ideas?
    Goran Brumen
    Audax d.o.o.
  • Hi Goran,

    Try a simple test. Create a new application with a Report, Designer, and Button to call Designer.ShowModal. In my testing it works.

    For the run-time Designer the IniStorageName property specifies the location of RBuilder.ini. The default value is ($LocalAppData)\RBuilder\RBuilder.ini but for older RB versions the default was different. Check the TppDesigner(s) in your project and update as needed.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Hi Nard,

    when is the best time to set:

    ppDesigner1.Form.DesignControllers.DocumentController.AutoSave.Enabled := False;
  • Hi Thomas,

    RB 21 introduces new TppDesigner.AutoSave boolean property. You can set this at Delphi design-time via the object inspector.


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.