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

Cariage returns in Memo fields when exporting to text

Hi,

When printing/exporting a report to a text file (csv) the memo fields that have multiple lines get their carriage returns removed. Is there a way to work around this to the memo exports to text/csv the same way they are displayed on the report?

Thank you,

Comments

  • Hi Mauricel,

    You can use the TppTextFileDevice.RetainLineBreaks property to keep the carriage returns. Do this by using the Report.OnFileDeviceCreate event.
    procedure TForm1.ppReport1FileDeviceCreate(Sender: TObject);
    begin
    if ppReport1.FileDevice is TppTextFileDevice then
    TppTextFileDevice(ppReport1.FileDevice).RetainLineBreaks := True;

    end;
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • This worked. Thank you so much for your help!
Sign In or Register to comment.