Closing FrxDesigner programmatically (after Save Report)

Serge GirardSerge Girard FRANCE, NANTES, HAUTE-GOULAINE
edited 12:18AM in FastReport VCL 5
Hello,

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

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.