Closing FrxDesigner programmatically (after Save Report)
Serge Girard
FRANCE, NANTES, HAUTE-GOULAINE
Hello,
Is there a way to close frxdesigner after report is saved (or saved as) ?
in my application
Is there a way to close frxdesigner after report is saved (or saved as) ?
in my application
function TMainForm.frxDesigner1SaveReport(Report: TfrxReport;
  SaveAs: Boolean): Boolean;
var AForm : TFormInformationGabarit;
begin
// need to have some description  in a formatted way
AForm:=TFormInformationGabarit.Create(Self);
try
  AForm.EtatDescription:=Etat.ReportOptions.Description;
  if AForm.ShowModal=mrok then  Report.ReportOptions.Description.Text:=AForm.EtatDescription.Text;
finally
  AForm.Free;
end;
// -------------------------------------------------
SaveFastReport.DefaultFolder:=DirDA;
SaveFastReport.ClientGUID:=GUID; // const
SaveFastReport.FileName:=Report.FileName;
if Length(Trim(Report.FileName))=0 then SaveFastReport.FileName:='brand*.fr3';
if SauverFastReport.Execute then
  begin
    Report.SaveToFile(SaveFastReport.FileName);
/// not sure this is needed
//Â Â Â Â if SaveAs then
//Â Â Â Â Â Â begin
//Â Â Â Â Â Â FRFileName.FileName:=SauverFastReport.FileName;
//Â Â Â Â Â Â Report.FileName:=ExtractFileName(SauverFastReport.FileName);
//Â Â Â Â Â Â end;
  end;
result:=True;Â Â //
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// Here i want to close designer Â
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ReloadLoadTest(Report);Â Â // reload report.filename
end;
Comments
I found my way in the russian forum https://www.fastreport.ru/ru/forum/index.php?showtopic=4431
Quick response is : frxReport1.Designer.Close
but this post show me also how to use the way to detect the Close Action of the designer