Manohar
Manohar

Reputation: 673

how to set custom line.separator in jasper report text exporter

I am trying to set the line.separator property using the below property in jrxml file.

    <property name="net.sf.jasperreports.export.text.line.separator" value="\r\n"/>

But, It is printing "\r\n" in my output file, instead of carriage-return and line-feed. What is missing here?

Upvotes: 2

Views: 2222

Answers (2)

Tharindu Balasuriya
Tharindu Balasuriya

Reputation: 1

I have verified the following solution and it working as expectedly jasper report text exports.

<property name="net.sf.jasperreports.export.text.line.separator" value="&#x0D;&#x0A;"/>

After changing LF to CRLF

Upvotes: 0

Manohar
Manohar

Reputation: 673

I had to use XML entities to get the desired behavior. Hope this helps.

    <property name="net.sf.jasperreports.export.csv.record.delimiter" value="&#x0D;&#x0A;"/>

Upvotes: 1

Related Questions