Bom pessoal tenho o seguinte código
@Action
public void Gerar() throws JRException {
JasperPrint jp = null;
TableModel model = new ReportTableModel();
JRTableModelDataSource ds = new JRTableModelDataSource(model);
System.out.println("this.reportTable.getRowCount() = " + this.reportTable.getRowCount());
for (int j = 0; j < this.reportTable.getRowCount(); j++) {
Map registro = new HashMap();
String date = this.reportTable.getValueAt(j, 0).toString();
System.out.println("dt = " + date);
String vol = this.reportTable.getValueAt(j, 1).toString();
System.out.println("vol = " + vol);
String desc = this.reportTable.getValueAt(j, 2).toString();
System.out.println("desc = " + desc);
String port = this.reportTable.getValueAt(j, 3).toString();
System.out.println("port = " + port);
registro.put("data", date);
registro.put("desc", desc);
registro.put("vol", vol);
registro.put("port", port);
try {
jp = JasperFillManager.fillReport("report4.jasper", registro, ds);
} catch (JRException e) {
e.printStackTrace();
}
}
JasperViewer.viewReport(jp, false);
}
Eu tenho uma tabela com 23 registros porém nesse código ele aparece apenas o último dentro do ireport
No meu IREPORT está com todos os campos String.
Alguém tem uma idéia de como proceder?
obrigado a todos