Jump to content
Changes to the Jaspersoft community edition download ×

why subreport got blank ???

2005 IR Help

Recommended Posts

By: wimaya - wimaya

why subreport got blank ???

2004-11-29 20:46



Iam a newbie using jasper report. I have a problem with my subreport. When I run my report using iReport, it was success. I can see both master report and master detail (both master and master detail have a query that I typed via iReport using

Report query form, my connection using



But when I run the report from my jsp page (with pdf viewer), the master report visible but my subreport got blank. With pdf, I sent data from bean, and then I sent some subreport parameter.

I think I have a problem with connection to my subreport. I thought the subreport will run query that I typed before via iReport, but it didn't work

=(. Because it's not run the query, so it does not

any records to iterate.


I try used whenNoDataType="AllSectionsNoDetail" in my subreport template, but it didn't work too =(.


For information, i give my java code in my jsp page :





application.getRealPath("/WEB-INF/lib/jasperreports-0.6.1.jar") +

System.getProperty("path.separator") +









DatabaseBridge databaseBridge = new DatabaseBridge();


Connection connection = databaseBridge.needConnection();





File reportFile = new File(application.getRealPath("/reports/MasterReport.jasper"));


parameters.put("BaseDir", reportFile.getParentFile());



byte[] bytes =




new HomeService()

); // new HomeService is my object, the source data from bean




ServletOutputStream ouputStream = response.getOutputStream();

ouputStream.write(bytes, 0, bytes.length);





Is there some missing code ??? Help me please...

Thank you for your attention...


Best Regards

Wimaya Septiningrum

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