4

我想问一下。如何在一个文本字段中的段落后添加中断。例如,

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

变成这样:-

"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
4

1 回答 1

9

您可以使用\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>

有关使用样式文本的更多信息,请参见此处

于 2012-04-09T08:06:08.400 回答