Archive for the ‘ JasperReport ’ Category

List Collection Data Not visible in mainreport of subreport – iReport


I have been wondering How iReport takes care of subreport I faced all above problem doing subreport in iReport.

In order to pass List / collection to subreport following things need to be done….

In Main Report. >>>>>>>>>>>>>>>>> Put Following

//Define List

Pass List to subreport

In Subreport >>>>>>>>>>>>>>>>> put Following

very important >>> below address is field in my addressess List in Main Report

and In Detail Section Put Following

Remeber Many time you might not see subreport visible in main report reson being it the Property for Data to visible >>

“When No Data “(Property of report) should be set accordingly.

Hope this might help some one….



Subreport not displayed in main Jasper Report ireport

I am sure somebody would face this problem..
Using ireport 3.7.2

Subreport in Ireport is not displayed until I do the following.

Remember to set properties of subreport (Also if ur using a static text to display in subreport)

Connection Type >>>> Use a datasource expression
Data Source Expression >>>> new net.sf.jasperreports.engine.JREmptyDataSource()

Make Sure you select “When No Data” Property to All Section No Details. most of the time Problem would be that data being set properly to subreport.

Look at this link for added information

simple Example with Javabeans/Java Object / POJO DataSource for JasperReport


small tutorial.. on Jasper Report JavaBeans DataSoruce with Static method

import java.util.ArrayList;

import sdInterface.JRDataSource;

public class JRFactoryClass {

public static ArrayList createBeanCollection () {
ArrayList list = new ArrayList();
// Java bean populated with row data by iBATIS
Employee msb = new Employee ();

list.add (msb);
Employee msb1 = new Employee ();

list.add (msb1);

return list;


create a JavaBeans set DataSource in Ireport to map the object with fieldName and static method.

Jasper Reports Java Objects/Class Map Example

Hi All,

Jasper Report Java Object Mapping example..

Following link give most of it. though it is back dated..

There are few books on IReport >> You might want to download from here.
Guide To IReport
The Definitive Guide to iReport (Expert's Voice)

Guide To JasperReport for Java
JasperReports for Java Developers: Create, Design, Format and Export Reports with the world's most popular Java reporting library