I want to set font for the value of variable $V{Payment Frequency} in a Text Field, using this expression but to no vail
"Payment frequency is <style isBold='true' forecolor='blue'>$V{Payment Frequency}</style>"
What's wrong with it?
I want to set font for the value of variable $V{Payment Frequency} in a Text Field, using this expression but to no vail
"Payment frequency is <style isBold='true' forecolor='blue'>$V{Payment Frequency}</style>"
What's wrong with it?
The working (correct) expression in your case is:
"Payment frequency is <style isBold='true' forecolor='blue'>" + $V{Payment Frequency} + "</style>"
You should append the value of variable as the String
in Java
language.
Your expression is like this block in Java:
String paymentFrequency = "some value";
String textFieldValue = "Payment frequency is <style isBold='true' forecolor='blue'>$V{Payment Frequency}</style>";
And my expression:
String paymentFrequency = "some value";
String textFieldValue = "Payment frequency is <style isBold='true' forecolor='blue'>" + paymentFrequency + "</style>";
For more details about markup you can look at Style a text field in JasperReports post.