Cannot save report change

edited July 2018 in FastReport 4.0
Hello,

FR won't save my report change when I load it in the designer.
I get message "Cannot create file e:\project\Report\. the specified path is not found"
I don't understand that FR lost the filename I passed in the LoadFromFile

I have more than twenty report with the same code for saving and only have problem with that report

Code for loading
File_name:='cotisation.fr3';  //(file_name : public variable)

frxReport1.Clear;
frxReport1.LoadFromFile(PathName+'Report\'+file_name );

frxReport1.DesignReport();

Code for saving:
function TDMReport.frxDesigner1SaveReport(Report: TfrxReport;
  SaveAs: Boolean): Boolean;
begin
SaveAs:=True;

if Report.Modified Then
begin
MessageBeep(MB_ICONEXCLAMATION);
If MessageDlg('Confirmez-vous les modifications ?',mtConfirmation, [mbYes,MbNo], 0) = mrYes then
Report.SaveToFile(PathName+'Report\'+File_name);
end;
end;

The debugger shows me that the variable FileName is empty in the SaveToFile function of frxClass.pas
procedure TfrxReport.SaveToFile(const FileName: String);



Thanks for helping me

Comments

  • edited 9:57AM
    Problem solved
  • PolomintPolomint Australia
    edited 9:57AM
    Freud wrote: »
    Problem solved
    For the benefit of others with similar problems, could you explain how this was resolved?

    Cheers, Paul
  • edited July 2018
    Polomint wrote:
    For the benefit of others with similar problems, could you explain how this was resolved?

    Sorry I had to explain that but I don't know exactly from where it comes
    I am using FR from delphi 7 the problem occured from the datamodule itself where I used the designer component the problem disappeared where I moved the designer component to a form.

Leave a Comment