Package ar.com.fdvs.dj.output

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


    private void writeReponse(final HttpServletRequest _request, final HttpServletResponse _response, final JasperPrint _jasperPrint, final ActionInvocation _invocation) throws JRException, IOException {
        setResponseHeaders(_response, _invocation);
        final HashMap parameters = new HashMap();
        parameters.put(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);
        final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, documentFormat, parameters);
        reportWriter.writeTo(_response);
    }
View Full Code Here


    protected void writeReponse(final HttpServletRequest _request, final HttpServletResponse _response, final JasperPrint _jasperPrint, final ActionInvocation _invocation) throws JRException, IOException {
        setResponseHeaders(_response, _invocation);
        final HashMap parameters = new HashMap(getExportParams(_invocation));
        parameters.put(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);

        final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, documentFormat, parameters);

        if (FORMAT_HTML.equals(documentFormat)) {
          Map imagesMap = new HashMap();
          JRExporter exporter = reportWriter.getExporter();
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);
          // Needed to support chart images:
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, _jasperPrint);
          _request.getSession().setAttribute("net.sf.jasperreports.j2ee.jasper_print", _jasperPrint);
        }

        reportWriter.writeTo(_response);
    }
View Full Code Here

    protected void writeReponse(final HttpServletRequest _request, final HttpServletResponse _response, final JasperPrint _jasperPrint, final ActionInvocation _invocation) throws JRException, IOException {
        setResponseHeaders(_response, _invocation);
        final HashMap parameters = new HashMap(getExportParams(_invocation));
        parameters.put(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);

        final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, documentFormat, parameters);

        if (FORMAT_HTML.equals(documentFormat)) {
          Map imagesMap = new HashMap();
          JRExporter exporter = reportWriter.getExporter();
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);
          // Needed to support chart images:
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, _jasperPrint);
          _request.getSession().setAttribute("net.sf.jasperreports.j2ee.jasper_print", _jasperPrint);
        }

        reportWriter.writeTo(_response);
    }
View Full Code Here

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

    JasperPrint _jasperPrint = generateJasperPrint(dynamicReport, layoutManager, ds,parameters);
    final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, JasperReportConstants.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);
        // Needed to support chart images:
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, _jasperPrint);
        request.getSession().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

    private void writeReponse(final HttpServletRequest _request, final HttpServletResponse _response, final JasperPrint _jasperPrint, final ActionInvocation _invocation) throws JRException, IOException {
        setResponseHeaders(_response, _invocation);
        final HashMap parameters = new HashMap(getExportParams(_invocation));
        parameters.put(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);
        final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, documentFormat, parameters);
        reportWriter.writeTo(_response);
    }
View Full Code Here

    protected void writeReponse(final HttpServletRequest _request, final HttpServletResponse _response, final JasperPrint _jasperPrint, final ActionInvocation _invocation) throws JRException, IOException {
        setResponseHeaders(_response, _invocation);
        final HashMap parameters = new HashMap(getExportParams(_invocation));
        parameters.put(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);

        final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, documentFormat, parameters);

        if (FORMAT_HTML.equals(documentFormat)) {
          Map imagesMap = new HashMap();
          JRExporter exporter = reportWriter.getExporter();
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);
          // Needed to support chart images:
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, _jasperPrint);
          _request.getSession().setAttribute("net.sf.jasperreports.j2ee.jasper_print", _jasperPrint);
        }

        reportWriter.writeTo(_response);
    }
View Full Code Here

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

    JasperPrint _jasperPrint = generateJasperPrint(dynamicReport, layoutManager, ds,parameters);
    final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, JasperReportConstants.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);
        // Needed to support chart images:
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, _jasperPrint);
        request.getSession().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

    protected void writeReponse(final HttpServletRequest _request, final HttpServletResponse _response, final JasperPrint _jasperPrint, final ActionInvocation _invocation) throws JRException, IOException {
        setResponseHeaders(_response, _invocation);
        final HashMap parameters = new HashMap(getExportParams(_invocation));
        parameters.put(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);

        final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(_jasperPrint, documentFormat, parameters);

        if (FORMAT_HTML.equals(documentFormat)) {
          Map imagesMap = new HashMap();
          JRExporter exporter = reportWriter.getExporter();
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, _request.getContextPath() + imageServletUrl);
          // Needed to support chart images:
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, _jasperPrint);
          _request.getSession().setAttribute("net.sf.jasperreports.j2ee.jasper_print", _jasperPrint);
        }

        reportWriter.writeTo(_response);
    }
View Full Code Here

        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

      if (exporterParams == null)
        exporterParams = new HashMap();
     
      exporterParams.put(JRHtmlExporterParameter.IMAGES_URI, request.getContextPath() + imageServletUrl);

      final ReportWriter reportWriter = ReportWriterFactory.getInstance().getReportWriter(jasperPrint, DJConstants.FORMAT_HTML, exporterParams);
     
      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.