Wednesday 5 July 2017

Tip : replaceAll method to remove extra & in a field text in Jasper Reports

This expression in Jasper reports is useful for a text that need to get into a new line whenever an & occurs but the problem is though the text gets into a new line it is displaying an extra & on output. 

Hence, using another replaceAll function from core java for field object we can overcome getting extra &.


Sample Expression:
 $F{ProjectDescription}.replaceAll("lt;br&gt;", "<br>" ).replaceAll("&","")

Tip Credits: Nimmana

No comments:

Post a Comment