Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make add break after paragraph in jasper reports

i want to ask. How to add break after paragraph in one text field. for example,

A report is a textual work (usually of writing, speech, television, or film) made with the specific intention of relaying information.

To be like this:-

"A report is a textual work  line 1

(usually of writing, speech, television, or film) line 2

 made with the specific intention of line 3

 relaying information" line 4
like image 875
Amin SCO Avatar asked Jan 16 '23 23:01

Amin SCO


1 Answers

You can use \n (newline) symbols or you can use the markup syntax.

The sample:

<title>
    <band height="167" splitType="Stretch">
        <textField isStretchWithOverflow="true">
            <reportElement x="414" y="38" width="100" height="20"/>
            <textElement markup="styled"/>
            <textFieldExpression><![CDATA["A report is a textual work <br/>(usually of writing, speech, television, or film) <br/>made with the specific intention of <br/> relaying information"]]></textFieldExpression>
        </textField>
        <textField isStretchWithOverflow="true">
            <reportElement x="26" y="38" width="100" height="20"/>
            <textElement/>
            <textFieldExpression><![CDATA["A report is a textual work\n(usually of writing, speech, television, or film)\nmade with the specific intention of \nrelaying information"]]></textFieldExpression>
        </textField>
    </band>
</title>

More information about using styled text is here.

like image 86
Alex K Avatar answered Feb 13 '23 10:02

Alex K