SubReport with JavaBean Datasource issue

0

I have one master report and one subreport.

I want either reports uses the same javabean Company, except that the subreport uses a collection property named Persons

 

public class Company{ List<Person> persons;  [..]get and set}
In the main report I did these actions:
  • put a parameter called PersonsSubReport
  • put a field called persons of type java.util.List
  • put the subreport object with this datasource: new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{persons})

What am I missing ?

fabrizio.stellato's picture
Joined: Mar 9 2015 - 6:21am
Last seen: 4 years 4 months ago

1 Answer:

0

Solved with adding to the subreport object of the master report

$P{PersonsSubReport}

 

fabrizio.stellato's picture
Joined: Mar 9 2015 - 6:21am
Last seen: 4 years 4 months ago
Feedback
randomness