If you have a weird character, such as a white box showing up in your field output, you can remove it in IReport by:

1) Click on the field, right click and choose properties.

2) Choose the text field tab

3) Surround the field declaration with this command:

($F{field}).replaceAll(”\\P{ASCII}+”,””)

This is a regular expresssion that will take anything that is not ascii out of the field…if its a string that is.

Leave a Reply

Your email address will not be published. Required fields are marked *