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

Setting "Modified" flag to true inside Designer.

edited June 2003 in End User
Hi,
When user enters into design mode I need the "Save changes?" query to pop up
regardless of him making any changes or not.
Also I need to know what he pressed (Yes, No, Cancel).
Can I do it without overwriting the whole saving process?

Thanks.
MB

Comments

  • edited June 2003
    Use the Report.Template.OnLoadEnd event to set Report.Modified to true. That
    would surely always force the save dialog to show when they exit the
    designer or try to load another report.

    To detect what they did, you'll have to make your own save dialog. This will
    require the OnCustomSaveDoc event to be assigned on the designer and you'll
    have to control the saving process.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    Thanks for Report.Modified.
    But do you have any examples or tutorials concerning saving within
    OnCustomSaveDoc matter? I don't quite understand what do you mean by
    controlling saving process. Will I just have to override several methods or
    do I must to create this saving from scratch? And if so, then what do I need
    to do for that?

    Thanks,
    MB

  • edited June 2003
    You'll have to implement the entire saving process, which isn't as much as
    it sounds like, because there is a method on the template to save to file.
    By default, if you don't assign this event handler, the designer calls
    Report.Template.Save. So, what you'll have to do is show a save dialog (so
    you can access the result), and then call Report.Template.SaveToFile based
    on the file they selected to save to. Set Report.Template.FileName before
    calling SaveToFile.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.