Report Modified

edited 12:30PM in FastReport .NET
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 12:30PM
    FastReport.Report report = new FastReport.Report();
    FastReport.Utils.Config.DesignerSettings.DesignerLoaded += delegate
    {
        report.Designer.Modified = false;
    };
    MessageBox.Show(report.Design().ToString());
    
  • edited 12:30PM
    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