Reputation: 488
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.
How can I make this windows to not appear and let the user see only the SaveDialog
, which is opened after clicking OK here?
Upvotes: 1
Views: 474
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