【发布时间】:2011-12-28 10:45:35
【问题描述】:
我想将文本字段中的一些文本加粗。我访问了http://jasperreports.sourceforge.net/sample.reference/markup/index.html,但没有得到想要的结果。我现在正在使用文本字段,但是当我尝试使用 styled/html 时,编译失败。那么你能帮我处理一下这个jrxml代码sn-p吗:
<textField>
<reportElement x="200" y="10" width="590" height="42"/>
<textElement markup="styled"/>
<textFieldExpression><![CDATA["The static text without any format.\nThe field's data with bold format<style isBold='true'>:" + $F{TASKS_SUBTASK} + "</style>\n<style isBold='true' isItalic='true' isUnderline='true'>The static underlined text with bold and italic format</style>"]]></textFieldExpression>
</textField>
在本例中:Style a text field in Jasper,文本字段表达式错误导致编译失败。
您的帮助将不胜感激。
【问题讨论】:
-
编译时遇到了什么错误?您是否尝试过使用
$F{TASKS_SUBTASK}表达式的示例?您所说的示例正在运行。 -
感谢 Alex 的回复,我的问题解决了。
-
将放入文本字符串解决的问题