mariahatie Posted August 18, 2014 Share Posted August 18, 2014 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] Link to comment Share on other sites More sharing options...
mariahatie Posted August 19, 2014 Author Share Posted August 19, 2014 Please help...anyone please? 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