如何在jasper报告中的段后添加break [英] How to make add break after paragraph in jasper reports

查看:187
本文介绍了如何在jasper报告中的段后添加break的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



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



如下: -

 报告是文字工作线1 

(通常是写作,演讲,电视或电影)第2行

根据第3行的特定意图b
$ b转发信息第4行


解决方案

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



样本:

 < title> 
< band height =167splitType =Stretch>
< textField isStretchWithOverflow =true>
< reportElement x =414y =38width =100height =20/>
< textElement markup =styled/>
< textFieldExpression><![CDATA [报告是文字作品< br />(通常是写作,演讲,电视或电影)< br />以特定意图制作< br />中继信息]]>< / textFieldExpression>
< / textField>
< textField isStretchWithOverflow =true>
< reportElement x =26y =38width =100height =20/>
< textElement />
< textFieldExpression><![CDATA [一份报告是一篇文字作品(通常是写作,演讲,电视或电影)\\ \\ n \\ n \\ n \\ n \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ ]>< / textFieldExpression>
< / textField>
< / band>
< / title>

有关使用样式文本的更多信息在这里


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

解决方案

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.

这篇关于如何在jasper报告中的段后添加break的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆