Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/07/2007, 11:12
Avatar de stock
stock
 
Fecha de Ingreso: junio-2004
Ubicación: Monterrey NL
Mensajes: 2.390
Antigüedad: 19 años, 10 meses
Puntos: 53
Re: Parametros para un Reporte (Jasper)

es sencillo, primero necesitas crear un objeto con esas propiedades, haces las instancias y las metes en un List, luego creas un objeto de tipo JRBeanCollectionDataSource(lista); como parametro le pasas la lista que creaste anteriormente, luego llenas el reporte con la funcion fillreport, algo asi:

lista.add(item2);
lista.add(item3);
JRBeanCollectionDataSource datos = new JRBeanCollectionDataSource(lista);
jasperPrint = JasperFillManager.fillReport(elReporte, losParametros, datos);

have funnnnnnnn

PD: Te puse solo lo que necesitas, he omitido pasos basicos, si quieres informacion basica, puedes leer este tutorial http://www.crysfel.com/index.php/200...-jasperreport/