New Blog Post: PDF/A and Metadata

XLSData - DBMemo - turn off automatic line breaks in cell?

edited June 2016 in Devices
Hi,

Testing out RB 17.02 Enterprise, Delphi 2007.

We have a customer that exports a lot of data using reportbuilder into
Excel. Previously they were using RB 10.09.

In RB 17.02 we're testing these exports using XLSData.

So, one of the requirements for their exports is to export DBMemo fields
into an Excel cell as is (i.e. no text changes). So:

- If there are new lines, then new lines remain in the cell.

- If there are longer lines than the width of the cell, the longer
lines remain (and Excel handles the wrapping/displaying of those lines).


In RB 17.02 we can control the first requirement via the
PreserveLineBreaks property in XLSSettings.

However when we view the data in Excel, we find that the text that has
lines longer than the width of the Excel cell have line breaks
automatically added.

E.g.

Original Text:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
officia deserunt mollit anim id est laborum.


However in Excel the text in the Cell ends up being the following with
the additional line breaks:

Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit
in voluptate velit esse cillum dolore
eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.


Is there any way we can turn that off?

Cheers
Nicholas

Comments

  • edited June 2016
    Hi Nicholas,

    You might try using Label or DBText with WordWrap set to False.

    Memo always wraps text, there is no way to turn that off. This occurs during
    report generation, when the Page.DrawCommands[ ] are generated. The output
    devices export the wrapped text.




    Best regards,

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.