如何在jasper报告中的段后添加break

Ami*_*SCO 4 jasper-reports

我想问一下.如何在一个文本字段中添加段后段.例如,

报告是一种文本作品(通常是写作,演讲,电视或电影),其目的是传递信息.

是这样的: -

"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
Run Code Online (Sandbox Code Playgroud)

Ale*_*x K 8

您可以使用\n(换行符)符号,也可以使用标记语法.

例子:

<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>
Run Code Online (Sandbox Code Playgroud)

有关使用样式文本的更多信息,请访问此处.