2012-04-09 113 views
4

我想问。如何在单个文本字段中添加分段段落。 例如,如何在jasper报告中的段落后添加中断

报告是一个文字工作(通常是写作,演讲,电视或电影)的具体目的是中继信息。

是这样的: -

"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 

回答

8

您可以使用\n(行)的符号,或者您可以使用标记语法。

样本:关于使用样式的文本is here

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

更多信息。

+0

非常感谢@Alex K. :) – 2012-04-09 08:38:15

+0

@Amin欢迎:) – 2012-04-09 09:23:39