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 4:20PM
    Problem solved
  • PolomintPolomint Australia
    edited 4:20PM
    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

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.