1

I have a jrxml file using which excel sheet is generated. The line from jrxml is shown below:

<text><![CDATA[Historical Places]]></text>

In my excel sheet I want Historical and Places to be displayed in two different lines. I tried some things from the link which was meant for xml Adding a new line/break tag in XML and it didn't work.

These are some of the ways that I tried but it didn't work:

 <text><![CDATA[Historical
                Places]]></text>
 <text><![CDATA[Historical \n Places]]></text>
 <text><![CDATA[Historical \r\n Places]]></text>
 <text><![CDATA[Historical "\r\n" Places]]></text>
 <text><![CDATA[Historical &#x13&#x10; Places]]></text>
 <text><![CDATA[Historical<br /> Places]]></text>
Community
  • 1
  • 1
likeGreen
  • 1,001
  • 1
  • 20
  • 40

1 Answers1

0

Today I fixed the issue. I added splitType="Stretch" and increased height from 29 to 37 in jrxml file.

<band height="37" splitType="Stretch">

Also made the following changes in reportElement x,y,width parameters in jrxml file. Initially x was 1040 and width was 80.

<reportElement mode="Transparent" x="980" y="12" width="100">

This fixed the issue. No changes is required in

<text><![CDATA[Historical Places]]></text>
likeGreen
  • 1,001
  • 1
  • 20
  • 40