0 Replies Latest reply on Sep 16, 2010 8:46 AM by Dhifi Borni

    JasperViewer on the server machine and not on the

    Dhifi Borni Newbie

      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?


      I use the following 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");
      ----------------------------------------------------------------------------------------

      thank you in advance.