> private JRBeanCollectionDataSource dataSource;
> private Map<String, Object> parameters = new HashMap<String, Object>();
> Collection<ReportBean> BeanList = createBeans();
> dataSource = new JRBeanCollectionDataSource(BeanList);
>  
>        //use parameters if the value doesn't change i.e.customer
> name,account number,etc.
>         parameters.put("PROJECT_ID", project.projectID);
>  
>  Collection<ReportBeans> createBeans(resultSet){
>         List<ReportBeanList> result = new ArrayList<ReportBeanList>();
>         foreach (value in the resultSet ) {
>               ResultsReportBean Bean = new ResultsReportBean();
>               Bean.setType("Project"); //i.e. prjoect or coverage
>               Bean.setId(Id);
>               etc, etc, etc
>         }    
>  
> result.addAll(Bean);
>  
> JasperReport jasperReport =
> JasperCompileManager.compileReport(templateFilename);
> JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,
> parameters , dataSource);
> JasperExportManager.exportReportToPdfFile(jasperPrint, reportFilename); 
> 

Thank you very much for your reply.
I dont expect spoon feeding. I try to kick start with the piece of code that
you provided.

-- 
View this message in context: 
http://www.nabble.com/Multiple-Object-in-DataSource-Collection-tp25816344p25837848.html
Sent from the jasperreports-questions mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

Reply via email to