I want to call my own Save Dialog instead of default save dialog on preview screen. Can anyone show me how to do that in Delphi? Thanks. I'm using Basic Fastreports.
Следующий обработчик переопределÑет обработчик кнопки "Открыть"
uses frxClass, frxPreview, frxPreviewPages, frxRes;
type
TForm1 = class(TForm)
  frxReport1: TfrxReport;
  procedure frxReport1Preview(Sender: TObject);
  procedure NewOnClick(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.frxReport1Preview(Sender: TObject);
begin
if frxReport1.PreviewForm is TfrxPreviewForm then
    begin
    TfrxPreviewForm(frxReport1.PreviewForm).OpenB.OnClick := NewOnClick;
    TfrxPreviewForm(frxReport1.PreviewForm).RightMenu.Items[4].OnClick := NewOnClick;
    end;
end;
procedure TForm1.NewOnClick(Sender: TObject);
var
OpenDlg: TOpenDialog;
begin
if frxReport1.Engine.Running then Exit;
OpenDlg := TOpenDialog.Create(nil);
try
  OpenDlg.Options := [ofHideReadOnly];
  OpenDlg.Filter := frxResources.Get('clFP3files') + ' (*.fp3)|*.fp3';
  if OpenDlg.Execute then
  begin
    TfrxPreview(frxReport1.Preview).LoadFromFile(OpenDlg.FileName);
    frxReport1.PreviewForm.Caption := OpenDlg.FileName;
  end;
finally
  OpenDlg.Free;
end;
end;
end.
Comments
For Save button code is a same