Jump to content

Exception When masterreport has multiple subreport


me_vsoundar

Recommended Posts

Hello,

             I have used jasper reports in struts2 framework.

Consider, I have a master Report called "Master.jrxml" with multiple subreports. I placed all the subreports one - by - one inside the detail part. I used a DAOlist(dataSource) for filling the jasper. It works fine until 5 subreports. If i add one subreport and run, it throws some exception like index 0 size 0... ( i added the error below this msg).

But if i put one sub report per one detail  then it works fine. Is this is the correct solution for the problem? (creating a new detail band for every subreport?).

 

 

ERROR:

    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    java.util.ArrayList.RangeCheck(Unknown Source)
    java.util.ArrayList.remove(Unknown Source)
    com.opensymphony.xwork2.util.CompoundRoot.pop(CompoundRoot.java:36)
    com.opensymphony.xwork2.ognl.OgnlValueStack.pop(OgnlValueStack.java:379)
    org.apache.struts2.views.jasperreports.ValueStackDataSource.next(ValueStackDataSource.java:126)
    net.sf.jasperreports.engine.fill.JRFillDataset.advanceDataSource(JRFillDataset.java:861)
    net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:779)
    net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1448)
    net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:108)
    net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:923)
    net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
    net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:561)
    net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)
    net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205)
    java.lang.Thread.run(Unknown Source)
 

Regars,

 ../../../themes/jasper/images//tools/forum/arrow.gif       Soundararajan V

Code:
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...