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

mp_we

Recommended Posts

Hello,

 

I have a servlet that does the following

Code:

JasperReport jsr = (JasperReport)JRLoader.loadObject("mainReport.jasper"«»);
JasperReport subReports = (JasperReport)JRLoader.loadObject("subReport.jasper"«»);
...................adding other subreports
File xmlMainReportSource = new File("MainReportSource.xml"«»);
JRDataSource subReportDataSource = new JRXmlDataSource(new File(SubReportSource.xml)"«»));
...................adding other subreport sources

//Preparing parameters
Map parameters = new HashMap();
parameters.put("DataSubreport", subReports);
parameters.put("DataSubreportSource",subReportDataSource);
..................adding all subreports and subreport sources

Document 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

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