2012-04-09 26 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