Reputation: 15084
I searched everywhere but couldn't find a definite answer: Is it possible to create a JasperReport's report containing a List that contains another List (or table) inside it? If yes, how can I pass parameters to the inside list?
I tried implementing this in iReport and received the following exception:
Error filling print... null
Setting up the file resolver... java.lang.UnsupportedOperationException
at net.sf.jasperreports.components.table.FillTableFactory.cloneFillComponent(FillTableFactory.java:46)
at net.sf.jasperreports.engine.fill.JRFillComponentElement.<init>(JRFillComponentElement.java:77)
at net.sf.jasperreports.engine.fill.JRFillComponentElement.createClone(JRFillComponentElement.java:187)
at net.sf.jasperreports.engine.fill.JRFillElementGroup.<init>(JRFillElementGroup.java:105)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.<init>(JRFillElementContainer.java:100)
at net.sf.jasperreports.components.list.FillListContents.<init>(FillListContents.java:58)
at net.sf.jasperreports.components.list.FillListContents.createClone(FillListContents.java:97)
at net.sf.jasperreports.components.list.HorizontalFillList.getContents(HorizontalFillList.java:308)
at net.sf.jasperreports.components.list.HorizontalFillList.prepare(HorizontalFillList.java:142)
at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:129)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:331)
at net.sf.jasperreports.components.list.FillListContents.prepare(FillListContents.java:86)
at net.sf.jasperreports.components.list.VerticalFillList.fillContents(VerticalFillList.java:153)
at net.sf.jasperreports.components.list.VerticalFillList.prepare(VerticalFillList.java:102)
at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:129)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:331)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:379)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:353)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2046)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:778)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:288)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:151)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:822)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:61)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:276)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:745)
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:891)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) a
t org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Print not filled. Try to use an EmptyDataSource...
Upvotes: 1
Views: 2858
Reputation: 11
I have just encountered this error too. Later I found that the method net.sf.jasperreports.components.table.FillTableFactory.cloneFillComponent
is actually not implemented until 6.0.0. So I replaced the old Jasperreport Library with 6.0.0 and the problem is solved.
Upvotes: 1
Reputation: 1985
Yes, with the notion of "Subdataset" to be included as a table for instance in the Details band. C.f. official IReport documentation (ireport-ultimate-guide.pdf) on their website.
Upvotes: 0