Bom dia,
Senhores(ritas), estou penando para resolver o erro “Error retrieving field value from bean :”. Sinceramente, já revisei todos os fields e eles “são identicos aos atributos do meu bean”, mas mesmo assim estou recebendo o erro.
//CÓDIGO QUE GERA O RELATÓRIO COM BASE NO LIST
public class ReportCreator implements Runnable {
private String jasperFile;
private List list;
public ReportCreator(String jasperFile, List list) {
this.jasperFile = jasperFile;
this.list = list;
}
private void create() throws BDOException {
try {
JRDataSource jrds = new JRBeanCollectionDataSource(this.list);
// parametros do relatorio
HashMap parameters = new HashMap();
// lendo arquivo jasper
File reportFile = new File(jasperFile);
JasperPrint impressao = JasperManager.fillReport(reportFile.getAbsolutePath(), parameters, jrds);
JasperViewer viewer = new JasperViewer(impressao, true);
viewer.setTitle("Relatório Contábil");
viewer.setBounds(0, 0, 800, 600);
viewer.show();
} catch (Exception e) {
throw new BDOException(e.getMessage());
}
}
public void run() {
try {
create();
} catch (BDOException e) {
System.out.println(e.getMessage());
}
}
}
//BEAN QUE POPULA O ARRAY LIST
public class ItemReport {
private Integer matricula = null;
private Integer idCompra = null;
private String cliente = null;
private Double totalCompra = null;
private Double totalRecebido = null;
private Double totalReceber = null;
private Double recebimentoMes = null;
private String formaPagto = null;
private Double notasEmitidas = null;
private Double notasEmitir = null;
private Double notasEmitidasMes = null;
private Double notasTotal = null;
public Integer get...
public void set...
}
}
Desde já agradeço pela ajuda.