小编joh*_*ohn的帖子

html实体名称未在jasper报告中显示为相关的html符号

我已经是检索的文本片段查询,其中包含各种HTML实体名称,最显着的€λ,(不是实际的符号,即€或λ)从数据库中.我使用相同的查询在浏览器和RTF jasper报告中显示大量文本.符号始终在浏览器中正确显示.

然而,当我在jasper中执行查询以生成rtf文档时,€字符串在rtf doc中以"&euro"出现,即分号消失了,因此我得到&1000欧元而不是€1,000.以下是我的报告中的文本字段.我已经尝试在CDATA中包装$ P {label.htmlSnippet},但没有运气,标记是html ...所以不确定我还能做什么?

<textField isStretchWithOverflow="true" hyperlinkType="None"> <reportElement positionType="Float" x="375" y="285" width="80" height="12"/> <textElement textAlignment="Right" markup="html"></textElement> <textFieldExpression class="java.lang.String">$P{label.htmlSnippet}</textFieldExpression> </textField>

任何帮助,意见建议赞赏

约翰

html entity jasper-reports

7
推荐指数
1
解决办法
796
查看次数

标签 统计

entity ×1

html ×1

jasper-reports ×1