Jump to content
We've recently updated our Privacy Statement, available here ×

Subreport data is not displayed with master report


shahinengg

Recommended Posts

Hello,

I am using iReport 3.7.1. I have designed a report with a subreport. When I run the report using ireport, it works well. Then I need to include this report into my web application where I am using struts2, java, tomcat etc.

When I call the report using Java Servlet, it displays only Master Report data, but subreport data is not displayed. I have already passed one day on it but I did not get any output.

PLEASE HELP ME ASAP. I also attached both jrxml files and Java servlet code.

Thanks.

shahin

Code:
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

I would say you're almost there. I think you're not seeing your subreport data because you're not adding in the compiled subreport object (which you named jasperDesignsub) to the parameters Map object. To see what I mean, check out the samples directory that ships with the JasperReports Library. In the jasperreports-pro-4.5.0/jasperreports/demo/samples/subreport\src directory there is a Java source file called SubreportApp.java that you can take a look at. I tested and it works. Specifically the "fill" method looks like this:

Code:
Link to comment
Share on other sites

  • 6 years later...

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...