Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRExporter.exportReport()


        exporter.setParameter(JRHtmlExporterParameter.HTML_HEADER, "");
        exporter.setParameter(JRHtmlExporterParameter.HTML_FOOTER, "");
        exporter.setParameter(JRHtmlExporterParameter.BETWEEN_PAGES_HTML, "");
        exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, new Boolean(true));
        exporter.setParameter(JRExporterParameter.PAGE_INDEX, new Integer(page - 1));
        exporter.exportReport();
        outReport.setContent(buf.toString());

        createPageNavigationControls(req, res, page, reportPrint.getPages().size(), reportModel, backModel);
      }
    }
View Full Code Here


    public void render(JasperSeamReport reportInstance, OutputStream output) throws IOException {
        JRExporter exporter = getExporter();
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, reportInstance.getDelegate());
        exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, output);
        try {
            exporter.exportReport();
        } catch (JRException e) {
            throw new ReportException(e);
        }
    }
View Full Code Here

      BufferedImage image = getPageImage(print.get(0));
      exporter.setParameter(JRGraphics2DExporterParameter.GRAPHICS_2D, image.getGraphics());
      exporter.setParameter(JRGraphics2DExporterParameter.ZOOM_RATIO, zoom);
      exporter.setParameter(JRExporterParameter.PAGE_INDEX, page);
      exporter.exportReport();

      ImageIO.write(image, format, output);
      return output.toByteArray();

    } catch (JRException e) {
View Full Code Here

        exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, print);
      else
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, print.get(0));
     
      exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, output);
      exporter.exportReport();
      Flushables.flushQuietly(output);
      return output.toByteArray()
     
    } catch (JRException e) {
      throw new RuntimeException(e);
View Full Code Here

      if(exporter == null) exporter = new JRPdfExporter();  

      exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
      exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
      exporter.exportReport();
      logger.debug("Report exported succesfully");
      //in = new BufferedInputStream(new FileInputStream(tmpFile));
      logger.debug("OUT");
      return tmpFile;
View Full Code Here

         exporter = new JRPdfExporter();
    }
     
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
      exporter.setParameter(JRExporterParameter.OUTPUT_FILE , reportFile);
      exporter.exportReport();
     
  }
 
  /**
   * Gets the virtualizer.
View Full Code Here

      }

      exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
      exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
      logger.debug("exporting report");
      exporter.exportReport();

    } catch(Throwable e) {
      logger.error("An exception has occured", e);
      return;   
    } finally {
View Full Code Here

      logger.debug("Exporting report...");
        try {
          exporter = getExporter(outputType);     
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
          exporter.setParameter(JRExporterParameter.OUTPUT_STREAM , out);
        exporter.exportReport();
        } catch (Throwable t) {
        throw new ExportException("Impossible to export report to format [" + outputType + "]", t);
      }
        logger.debug("Report exported succesfully...");
       
View Full Code Here

        JRExporter exporter = new JRGraphics2DExporter();
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
        exporter.setParameter(JRGraphics2DExporterParameter.GRAPHICS_2D, gr2 );
        exporter.setParameter(JRGraphics2DExporterParameter.PAGE_INDEX, new Integer(index));
        try{
          exporter.exportReport();
        } catch(Exception e) {
          export = false;
          continue;
        }
        index++;
View Full Code Here

      logger.debug("Exporter class used is  [" + exporter.getClass().getName()+ "]");


      exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
      exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
      exporter.exportReport();
      monitorExportReport.stop();
      logger.debug("Report exported succesfully");


    } catch(Throwable e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.