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

mariahatie

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by mariahatie

  1. Hello, I have an application built in GWT and Spring. I am trying to generate Jasper Reports on the server side. However when I execute the functionality, it hangs/stops at jasperDesign = JRXmlLoader.load(file_name); and does not respond or throw an exception. This means that my RPC call that triggers the report generation function does not return a response either (so the application hangs). However when I run the function in a normal java application it generates a report without any problem. What could be the issue? I am using JasperReports version 5.6.0. My java function: public StandardServerResponse printReport(List<Object> items) { StandardServerResponse response = new StandardServerResponse(); String file_name = null; Map<String, Object> parameters; JasperDesign jasperDesign; JasperReport jasperReport; JasperPrint jasperPrint; try { for (Object obj: items) { parameters = new HashMap<String, Object>(); parameters.put("id_in", obj.getId()); file_name = "G:\myreport.jrxml"; jasperDesign = JRXmlLoader.load(file_name); //application stops here jasperReport = JasperCompileManager.compileReport(jasperDesign); jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource.getConnection()); JasperExportManager.exportReportToPdfFile(jasperPrint, "G:\report.pdf"); } response.setSuccess(true); } catch (Exception ex) { ex.printStackTrace(); response.setSuccess(false); } return response; }[/code]
×
×
  • Create New...