I found way to resolve this issue, it's a bug in Dynamic Jasper I think because Jasper need to name the field exactly as the column name and use this field as the TextExpression.
So to avoid doing this we need to override this function and using customExpression so the code need to be changed to this :
abstractColumn = ColumnBuilder.getNew()
.setColumnProperty(columns.get(i).getColumnLabel(), String.class.getName())
.setTitle(columns.get(i).getColumnLabel()).setWidth(85)
.setStyle(commonStyle).setHeaderStyle(headerStyle)
.setCustomExpression(new CustomExpression() {
public Object evaluate(Map fields, Map variables, Map parameters) {
return (String) fields.get(columnName);
}
public String getClassName() {
return String.class.getName();
}
})
.build();
This will resolve the problem for all the special chars. I will show you how the JRXML file will look as if we made this modification just to understand the concept :
It will be changed from :
<textFieldExpression><![CDATA[$F{$$}]]>
To
<textFieldExpression><![CDATA[((ar.com.fdvs.dj.domain.CustomExpression)$P{REPORT_PARAMETERS_MAP}.get("customExpression_for_DJR_3068_COLUMN_1")).evaluate( ((ar.com.fdvs.dj.core.DJDefaultScriptlet)$P{REPORT_SCRIPTLET}).getCurrentFiels(), ((ar.com.fdvs.dj.core.DJDefaultScriptlet)$P{REPORT_SCRIPTLET}).getCurrentVariables(), ((ar.com.fdvs.dj.core.DJDefaultScriptlet)$P{REPORT_SCRIPTLET}).getCurrentParams() )]]></textFieldExpression>
</textField>
Hope this will help someone :)