Thread View: pl.comp.lang.java
1 messages
1 total messages
Started by Aras
Mon, 23 Jul 2012 10:18
iReport - javaBean dataSorce daje nulle
Author: Aras
Date: Mon, 23 Jul 2012 10:18
Date: Mon, 23 Jul 2012 10:18
25 lines
1704 bytes
1704 bytes
Witam,
mam problem z generowaniem raportu uzywając beanów jako źródła danych.
Mam przykładową klase z jednym polem o nazwie "nazwa" typu String,
odpowiednim getterem i setterem. Tworze jej obiekt, ustawiam wartośc
stringa.
------------------------------------------------------------------------------
List<MojaKlasa> lista = new ArrayList<MojaKlasa>();
lista.add(new MojaKlasa("jakiś string"));
....
....
InputStream iStream = getClass().getResourceAsStream("raport.jasper");
JasperPrint jp = JasperFillManager.fillReport (iStream,params,new
JRBeanCollectionDataSource(lista) );
JasperViewer podglad = new JasperViewer(jp,false);
podglad.setVisible(Boolean.TRUE);
------------------------------------------------------------------------------
Problem polega na tym, że pole to w raporcie uparcie dostaje nulla.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads