Package ar.com.fdvs.dj.output

Examples of ar.com.fdvs.dj.output.ReportWriter


        parameters = new HashMap();
      if (exporterParams == null)
        exporterParams = new HashMap();

      JasperPrint _jasperPrint = DynamicJasperHelper.generateJasperPrint(dynamicReport, layoutManager, ds,parameters);
      final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, DJConstants.FORMAT_HTML, parameters);
      parameters.put(JRHtmlExporterParameter.IMAGES_URI, request.getContextPath() + imageServletUrl);

      Map imagesMap = new HashMap();
          JRExporter exporter = reportWriter.getExporter();
          exporter.setParameters(exporterParams);

          exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, request.getContextPath() + "/" + imageServletUrl + "?image=");
          // Needed to support chart images:
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, _jasperPrint);
          HttpSession session = request.getSession();
          session.setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, _jasperPrint);
      session.setAttribute("net.sf.jasperreports.j2ee.jasper_print", _jasperPrint);

      //write generated HTML to the http-response (the one you got from the helper)
          reportWriter.writeTo(response);
    }
View Full Code Here

TOP

Related Classes of ar.com.fdvs.dj.output.ReportWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.