2013-05-09 88 views
0

我想设置字体为变量$ V {付款频率}在文本字段的值,用这种表达,但没有韦尔在碧玉报告表达可变

"Payment frequency is <style isBold='true' forecolor='blue'>$V{Payment Frequency}</style>" 

设置字体有什么不妥的地方?

回答

0

工作(正确的)表达你的情况是:

"Payment frequency is <style isBold='true' forecolor='blue'>" + $V{Payment Frequency} + "</style>" 

你应该Java语言追加为String变量的值。

你的表情就像是在的Java块:

String paymentFrequency = "some value"; 
String textFieldValue = "Payment frequency is <style isBold='true' forecolor='blue'>$V{Payment Frequency}</style>"; 

而且我的表情:

String paymentFrequency = "some value"; 
String textFieldValue = "Payment frequency is <style isBold='true' forecolor='blue'>" + paymentFrequency + "</style>"; 

有关标记的更多信息,你可以看看Style a text field in JasperReports岗位。

+0

太好了。有用。谢谢。 – bnguyen82 2013-05-09 09:38:29

+0

欢迎您:) – 2013-05-09 09:38:55