Removing Form Feed char in FastReport VCL Export to text file

56 views Asked by At

I have a very simple FastReport VCL 5.6.8 report. Master Data band only. No header, footer or any other band.

The intent is to prepare the report and export to a text file to be sent as an SMS.

My problem is that the exported text file ends with a FF character (Form Feed)

I noticed a "PageBreaks" property of the text export component which I set to FALSE, but has no discernible effect. My text file always ends with a FF character.

      if FastReportPrint.PrepareReport(true) then 
      begin
         // Export to file
         if ASMS then  // always export to plain text file regardless of DBLS_ExportFormat
         begin
            {$IF CompilerVersion>=34}
            frxTXTExport := TfrxSimpleTextExport.Create(nil);
            {$ELSE}
            frxTXTExport := TfrxTxtExport.Create(nil);
            {$IFEND}
            frxTXTExport.PageBreaks := false;
            frxTXTExport.PrinterDialog := false;
            frxTXTExport.ShowDialog := false;
            ExportFilter := frxTXTExport;
            sExtension := 'TXT';
         end
            ExportFilter.Filename := format('%s%s_%s_%s.%s', [A[6] + sFolder, trim(DBLS_LetterName), ADbtCode,
                                       formatdatetime('yyyy-mm-dd_hh-nn-ss', Now), sExtension]);

            ExportFilter.ShowDialog := false;
            FastReportPrint.Export(ExportFilter);

Has anyone got thoughts on how to rid myself of the trailing FormFeed character?

TIA

0

There are 0 answers