
Jasper Report
Publicado por Roderick (7 intervenciones) el 03/08/2016 20:44:49
Hola haber si me ayudan .
tengo que generar informes con iReport o Jasper no se cual es la diferencia o si almenos hay una jeje XD
la cuestion es que necesito crear un reporte o mejor dicho generarlo pero tomando solo los registros filtrados por un JTextField de mi JForm.
este es el codigo que he hecho no me manda error pero tampoco hace nada.
agradezco su ayuda saludos...
tengo que generar informes con iReport o Jasper no se cual es la diferencia o si almenos hay una jeje XD
la cuestion es que necesito crear un reporte o mejor dicho generarlo pero tomando solo los registros filtrados por un JTextField de mi JForm.
este es el codigo que he hecho no me manda error pero tampoco hace nada.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
private void informeActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
List lista = new ArrayList();
for(int i = 0; i<tablaview.getRowCount();i++)
{
lista spectterra = new lista( tablaview.getValueAt(i, 0).toString(), tablaview.getValueAt(i, 1).toString(),tablaview.getValueAt(i, 2).toString(),tablaview.getValueAt(i, 3).toString(),tablaview.getValueAt(i, 4).toString(),tablaview.getValueAt(i, 5).toString(),tablaview.getValueAt(i, 6).toString(),tablaview.getValueAt(i, 7).toString(),tablaview.getValueAt(i, 8).toString(),tablaview.getValueAt(i, 9).toString(),tablaview.getValueAt(i, 10).toString(),tablaview.getValueAt(i, 11).toString(),tablaview.getValueAt(i, 12).toString(),tablaview.getValueAt(i, 13).toString(),tablaview.getValueAt(i, 14).toString(),tablaview.getValueAt(i, 15).toString(),tablaview.getValueAt(i, 16).toString(),tablaview.getValueAt(i, 17).toString(),tablaview.getValueAt(i, 18).toString(),tablaview.getValueAt(i, 19).toString(),tablaview.getValueAt(i, 20).toString(),tablaview.getValueAt(i, 21).toString(),tablaview.getValueAt(i, 22).toString(),tablaview.getValueAt(i, 23).toString(),tablaview.getValueAt(i, 24).toString(),tablaview.getValueAt(i, 25).toString(),tablaview.getValueAt(i, 26).toString(),tablaview.getValueAt(i, 27).toString(),tablaview.getValueAt(i, 28).toString(),tablaview.getValueAt(i, 29).toString(),tablaview.getValueAt(i, 30).toString(),tablaview.getValueAt(i, 31).toString(),tablaview.getValueAt(i, 32).toString(),tablaview.getValueAt(i, 33).toString(),tablaview.getValueAt(i, 34).toString());
lista.add(spectterra);
}
try {
JasperReport reporte = (JasperReport) JRLoader.loadObject("C:\\Users\\CaptadorDeDatos\\Desktop\\GestorDB\\GestorDB\\src\\vista\\reporte.jrxml");
Map parametro = new HashMap();
parametro.put("HOLEID", "HOLEID");
JasperPrint jprint = JasperFillManager.fillReport(reporte, parametro, new JRBeanCollectionDataSource(lista));
JasperViewer.viewReport(jprint);
} catch (JRException ex) {
//Logger.getLogger(Gestor.class.getName()).log(Level.SEVERE, null, ex);
}
}
agradezco su ayuda saludos...
Valora esta pregunta


0