jasper reports - Setting bold with text field and parameter with string "&" scratch pdf -
im trying set bold in part of text field concats parameter (nocurso) when parameter comes character "&" scratch pdf print.
this prints style tag bold besides put in bold text. , works when parameter not come "&"
see below text field
"eu, "+$p{noaluno}.touppercase()+", portador(a) da cédula de identidade número "+$p{nurg}+", declaro, sob penas da lei, que entregarei todos os documentos necessários para efetivação da matrícula no curso "+$p{nocurso}.touppercase()+". "
what going on?
you can use apache commons library method escape special characters in parameter:
org.apache.commons.lang.stringescapeutils.escapehtml($p{nocurso}).touppercase()
more on issue can found in jasperforge ireport forums.
the apache commons lang api can found here. in particular, need download commons-lang library here.
Comments
Post a Comment