borni Posted September 16, 2010 Share Posted September 16, 2010 Hello everyone, I hope someone could help me with this bug ...why if I want to generate a report on a client machine Viewer JasperViewer appears on the server machine and not on the client machine?thank you in advance.I use the following code: Code: String webRoot = servletContext.getRealPath("/COMPTA"); fileXml = new File(webRoot + "\\reports\\balance_generale.jrxml"); JasperDesign jasperDesign = JRXmlLoader.load(fileXml); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, model, connection); JasperViewer.viewReport(jasperPrint, false); JasperExportManager.exportReportToPdfFile(jasperPrint, par.getType_rapport() + ".pdf"); Link to comment Share on other sites More sharing options...
szaharia Posted September 16, 2010 Share Posted September 16, 2010 You have to deploy the viewer as Java applet in order to run it on a client machine. See the last paragraph of this FAQ. You'll find some hints in the webapp sample (see the /applets directory).Hope this helps,sanda 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