Property for direct Export

Hello there

We have a application that uses Fastreport 4.7 for report Design. Do you now if it's possible to set a property to direct export in a *.csv - File without doing a print preview and selecting the option "Export".

Thx for your ideas.

Greetings from Switzerland.

Patrick

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 3:06AM
    code to load report
    frxreport1.preparereport;
    frxReport1.Export(frxCSVExport1);

    The export filter component must be available
    (you must put it on the form of your project)
    and be adjusted correctly.
  • Now, how can I change the file type to save as? After creating the CSVexport filter component, I change the delimiter to a tab and I want to save it with a .tab file extension. I can't seem to accomplish that. Following is a snippet of my code, but when the save dialog comes up it still shows the default *.csv.

    frxCsv := TfrxCsvExport.Create(nil);
    frxCsv.Separator := #09;
    frxCsv.FilterDesc := 'TAB file (*.tab)|*.tab';
    frxRpt.PrepareReport();
    frxRpt.Export(frxCsv);

  • gordkgordk St.Catherines On. Canada.
    edited 3:06AM
    file extension cannot be changed.

Leave a Comment