Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Text File CRLF Problem

edited March 2002 in General
Using D5/RB553

TextFileType := ftComma; and TextFileType := ftTab; both place a CRLF at the
end of each line but not on the end of the last line

My problem arises when I later try to append these files each other using a
DOS copy command. With the missing CRLF on the last line of the files RB
thet makes for me, it screws up other stuff down the line.

Any suggestions?

Comments

  • edited March 2002
    This is intentional on the text file device, so that you don't get a CRLF at
    the last line. You'll have to add the CRLF before the first when you append
    to the text file. You could use the Report.OnPrintDialogClose event to
    read the text file name that was just created, and append a CRLF to it at
    that time.

    lsFileName := Report.PrintDialog.TextFileName;

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited July 2002
    Add a summary band to the report.
    Put on it a text control with no actual text in it.
    Make sure that this band and control are set to be exported.

    By the looks of it, as each line is written out, it is the "next" line that
    write the CRLF to the "previous" line.

    So, when all the data is exported, the summary band is then expected to be
    printed.

    This adds the CRLF to the previous line.

    But, there is nothing on the summary line to print, so no further output is
    made.

    If you DO have something in the control on the summary band, then this will
    appear as the last line, also unterminated.

    Regards,

    Richard Quadling.
    Carval Computing Limited.


This discussion has been closed.