doolan Posted September 1, 2006 Posted September 1, 2006 Well, I've searched all over the forums and I can't find the solution to my problem. I have a master report that uses a subreport. If I run the subreport by itself, I get a nice pdf report. However, when I try to include it in the master report, a get a blank page. I think the jrxml files are ok, maybe my error is in the java code. Here's what I've got. //Getting subreport JasperCompileManager.compileReportToFile("reports/jrxml/SubreportDemo.jrxml"); JasperReport subreport = (JasperReport)JRLoader.loadObject("reports/jrxml/SubreportDemo.jasper"); //Preparing parametersMap parameters = new HashMap();parameters.put("SubreportDemo", subreport); //Getting master-reportJasperCompileManager.compileReportToFile("reports/jrxml/MasterReportDemo.jrxml");JasperRunManager.runReportToPdfFile("reports/jrxml/MasterReportDemo.jasper", parameters, connection); Does the subreport need to be filled before it is passed to the master report as a parameter? Or does the master report do all the filling?(I am using iReport to generate the jrxml files)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now