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

How to save the report in the designer at runtime?

edited June 2005 in General
Hi,

I want to save the report before the user closes the designer. How can I do
this?

--
Best Regards
Sven Langenkamp

CT Datentechnik GmbH
Eschenstr. 2
D-31582 Nienburg/Weser
Germany

Telefon: +49 [0] 5021 - 9724-15
Telefax: +49 [0] 5021 - 9724-18
http: www.ctdatentechnik.de
e-mail: langenkamp@ctdatentechnik.de

Comments

  • edited June 2005
    Hi Sven,

    If you have the Report.SaveAsTemplate property set to True, the user will be
    asked if they would like to save if they have changed the report and are
    closing the designer. Is this the functionality you are after?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2005
    Yes thats what I need but it does not work That's the code if I start the
    designer:

    Report.SaveAsTemplate := True;
    Report.Template.FileName := ReportPath;
    Report.Template.LoadFromFile;
    Report.Language := GetLanguage;
    FReportDesigner := ReportDesigner; //Singelton Object
    FReportDesigner.OnShow := DesignerShow;
    FReportDesigner.OnSelectionChanged := DesignerSelectionChanged;
    FReportDesigner.OnClose := DesignerClose;
    FReportDesigner.Report := Report;
    FReportDesigner.Show;
    end;


    After changing and closing the report no dialog opens.



  • edited June 2005
    Ok, it workes. I have to do

    FReportDesigner.Report.SaveAsTemplate := True;

    Thanks!


  • edited June 2005

    Try setting SaveAsTemplate to True, after you load the .rtm.

    When you load a report definition (.rtm), all of the published properties of
    the TppReport are set to the values that were saved to the .rtm.

    You can override these values either by using the Report.Template.OnEndEvent
    or by setting the after you cann LoadFromFile.


    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.