wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes passing collection as datasource to jasper report. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "passing collection as datasource to jasper report." Watch "passing collection as datasource to jasper report." New topic
Author

passing collection as datasource to jasper report.

Rajubhai Kotwal
Ranch Hand

Joined: Nov 03, 2009
Posts: 47
Experts, I am trying to work on report which contains main report and sub reports. In main report's header i want to pass sub report to print the header and in sub report i want to display data. I am using JRBeanCollectionDataSource. I have created a bean class where in I am setting/getting methods. In my main class I am exporting the beans to jasper file. My problem resides in passing collections of multiple beans. How should I pass multiple beans to jasper files?


Now my problem is how to pass Object of here? Instead of passing list through JRBeanCollectionDataSource jbs = new JRBeanCollectionDataSource(list); i would like to pass Object of list so that i can send multiple beans. I can pass collection through public JRBeanCollectionDataSource(java.util.Collection beanCollection) but not the objects. Does anyone know how should i pass objects? I am stuck in this problem as i am confused here while passing datasource. I can pass only one datasource to jasper report. Please do let me know your ideas and suggestions. Thank you.
Julius Kabugu
Greenhorn

Joined: Nov 02, 2010
Posts: 3
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Welcome to Javaranch Julius Kabugu!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Julius Kabugu
Greenhorn

Joined: Nov 02, 2010
Posts: 3
Thank you! Hope to contribute largely!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing collection as datasource to jasper report.
 
Similar Threads
Problem in passing JRBeanCollectionDataSource as parameter to jasperreport
Problem in passing JRBeanCollectionDataSource as parameter to jasperreport
help on JasperReport with JavaBean as DataSource
Jasper Reports for RTF format and single object
Jasper Reports with hibernate