mp_we Posted June 15, 2007 Share Posted June 15, 2007 Hello, I have a servlet that does the followingCode:JasperReport jsr = (JasperReport)JRLoader.loadObject("mainReport.jasper"«»);JasperReport subReports = (JasperReport)JRLoader.loadObject("subReport.jasper"«»);...................adding other subreportsFile xmlMainReportSource = new File("MainReportSource.xml"«»);JRDataSource subReportDataSource = new JRXmlDataSource(new File(SubReportSource.xml)"«»));...................adding other subreport sources//Preparing parametersMap parameters = new HashMap();parameters.put("DataSubreport", subReports);parameters.put("DataSubreportSource",subReportDataSource);..................adding all subreports and subreport sourcesDocument document = JRXmlUtils.parse(xmlMainReportSource);parameters.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, document);JasperPrint jprint = JasperFillManager.fillReport(jsr, parameters);JasperExportManager.exportReportToPdfFile(jprint, "demo.pdf"«»); If the source XMLs are small in size, the PDF (approx 20 K) gets created and displays content. If any of the source XMLs are large in size, the PDF gets created but displays blank. If anyone has any ideas on what I could try to correct this, please let me know.Thanks. Link to comment Share on other sites More sharing options...
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