JasperReports:不支持&当我使用风格时签名 [英] JasperReports: Not support & sign when i use style

查看:159
本文介绍了JasperReports:不支持&当我使用风格时签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 JasperReports

<style pdfFontName="Helvetica-BoldOblique" isBold="true" isItalic="true" 
forecolor="red">Instruction and instruction</style>

不在 JasperReports中工作

<style pdfFontName="Helvetica-BoldOblique" isBold="true" isItalic="true"
forecolor="red">Instruction & instruction</style>

为什么会这样?

推荐答案

我用过
& amp; amp;
而不是&它正在jasper报告中工作。

I have used &amp;amp; instead of "&" and it is working in jasper report.

<style pdfFontName="Helvetica-BoldOblique" isBold="true" isItalic="true"
forecolor="red">Instruction &amp;amp; instruction</style>

//在文字档案中,我使用了样式标记。

//In text filed i have used style tag.

<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
                <reportElement
                    x="0"
                    y="0"
                    width="290"
                    height="15"
                    key="textField"
                    isRemoveLineWhenBlank="true"/>
                <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" rightPadding="5" bottomBorder="None" bottomBorderColor="#000000"/>
                <textElement textAlignment="Center" isStyledText="true">
                    <font size="9"/>
                </textElement>
            <textFieldExpression   class="java.lang.String"><![CDATA[<style pdfFontName="Helvetica-BoldOblique" isBold="true" isItalic="true"
forecolor="red">Instruction &amp;amp; instruction</style>]]></textFieldExpression>
            </textField>

这篇关于JasperReports:不支持&amp;当我使用风格时签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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