java - JRException: Error retrieving field value from bean: bornDate -
this question has answer here:
borndate java.util.date field in class, used fill collection represented list of employees. so, when second line read:
jrbeancollectiondatasource beancollectiondatasource = new jrbeancollectiondatasource(lista); jasperprint jasperprint = jasperfillmanager.fillreport(relatorio, parametros, beancollectiondatasource);
this message appears: jrexception: error retrieving field value bean: borndate
yes, understand type mismatch. how can solve this? in jrxml file or in java class?
in both, since class , name need's match
in java need method
public java.util.date getborndate(){return borndate};
in jrxml need the correct field declaration
<field name="borndate" class="java.util.date"> <fielddescription><![cdata[]]></fielddescription> </field>
Comments
Post a Comment