Oh nooo
Oh nooo

Reputation: 488

Disable output file settings dialog when using text export

Using the frxSimpleTextExport component I can save my report as a .txt file, but as soon as I click on the Save as txt button, an unwanted dialog appears.

enter image description here

How can I make this windows to not appear and let the user see only the SaveDialog, which is opened after clicking OK here?

enter image description here

Upvotes: 1

Views: 474

Answers (1)

Val Marinov
Val Marinov

Reputation: 2755

To disable "Export to text" dialog(The first one in your question):

Set frxSimpleTextExport.ShowDialog property to false:

 frxSimpleTextExport.ShowDialog := False;

Now this dialog window will not appear but SaveDialog will disappear also. To show 'SaveDialog' drop TSaveDialog on your form and in frxSimpleTextExport BeginExport event write :

procedure TForm7.frxSimpleTextExport1BeginExport(Sender: TObject);
begin
  if SaveDialog1.Execute() then
    begin
      frxSimpleTextExport1.FileName := SaveDialog1.FileName;
    end;
end;

Upvotes: 2

Related Questions