Report Modified

Hello,

I am currently evaluating FastReport.
How do I know if a report has been modified?

My reports templates are saved in a database. I load them to allow the user to modify them. Someting like that:
using (var report = new Report()){
  report.LoadFromString(model.Source);
  if(report.Desing(true)) {
    // here, the model has been modified
   }
}

The problem is that report.Design(true) always returns true, although the template has not been modified. And in fact, from the line report.LoadFromString(model.Source);, the Modified property of report.ReportInfo has changed.

How do I proceed to perform this operation?

Thank you.


Translated with www.DeepL.com/Translator

Comments

  • edited 1:05PM
    FastReport.Report report = new FastReport.Report();
    FastReport.Utils.Config.DesignerSettings.DesignerLoaded += delegate
    {
        report.Designer.Modified = false;
    };
    MessageBox.Show(report.Design().ToString());
    
  • edited 1:05PM
    Thank you, it works perfectly.
    In fact, I placed the event management in the main part of the application, so as not to systematically add a event handler each time the designer opens.

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.