Package net.sf.jasperreports.engine.export

Examples of net.sf.jasperreports.engine.export.JRXlsExporter.exportReport()


            xls.setParameter(
                    JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,
                    Boolean.TRUE);
            xls.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND,
                    Boolean.FALSE);
            xls.exportReport();

        } catch (JRException e) {
            throw new ReportFileManagerException(
                    "Ocorreu um erro ao tentar exportar os dados para formato XLS",
                    e);
View Full Code Here


        ByteArrayOutputStream buf = new ByteArrayOutputStream();
        JRExporter exporter = new JRXlsExporter();

        exporter.setParameter(JRExporterParameter.JASPER_PRINT, reportPrint);
        exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, buf);
        exporter.exportReport();
        outReport.setContent(buf.toByteArray());
      }
      else
      {
        StringBuffer buf = new StringBuffer();
View Full Code Here

        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(), backModel);
      }
    }
View Full Code Here

        exporter.setParameter(JRExporterParameter.JASPER_PRINT, reportPrint);
        exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, buf);
        exporter.setParameter(JRExporterParameter.IGNORE_PAGE_MARGINS, true);
        exporter.setParameter(JRExporterParameter.FILTER, noLayoutFilter);
        exporter.exportReport();
        outReport.setContent(buf.toByteArray());
      }
      else
      {
        StringBuffer buf = new StringBuffer();
View Full Code Here

        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

            }
           JRXlsExporter exporter = new JRXlsExporter();
           exporter.setParameter(JRXlsExporterParameter.JASPER_PRINT, jp);
           exporter.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, response.getOutputStream());
           exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
           exporter.exportReport();

        } catch (IOException ie) {
            throw new ViewHandlerException("IO Error in report", ie);
        } catch (java.sql.SQLException e) {
            throw new ViewHandlerException("Database error while running report", e);
View Full Code Here

            }
           JRXlsExporter exporter = new JRXlsExporter();
           exporter.setParameter(JRXlsExporterParameter.JASPER_PRINT, jp);
           exporter.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, response.getOutputStream());
           exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
           exporter.exportReport();

        } catch (IOException ie) {
            throw new ViewHandlerException("IO Error in report", ie);
        } catch (java.sql.SQLException e) {
            throw new ViewHandlerException("Database error while running report", e);
View Full Code Here

    protected void doExport(final OutputStream outputStream, final Print print) throws JRException {
        JRXlsExporter exporter = new JRXlsExporter();
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
        exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);

        exporter.exportReport();
    }
}
View Full Code Here

          exporterXLS.setParameter(JRExporterParameter.JASPER_PRINT, print);
          exporterXLS.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);
          exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
          exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
          exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
          exporterXLS.exportReport();
          break;
        case ODS:
          logger.debug(bundle.getString("exporting-report", "ods"));
            JROdsExporter exporterODS = new JROdsExporter();
            exporterODS.setParameter(JRExporterParameter.JASPER_PRINT, print);
View Full Code Here

          exporterXLS.setParameter(JRExporterParameter.JASPER_PRINT, print);
          exporterXLS.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);
          exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
          exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
          exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
          exporterXLS.exportReport();
          break;
        case ODS:
          logger.debug(bundle.getString("exporting-report", "ods"));
            JROdsExporter exporterODS = new JROdsExporter();
            exporterODS.setParameter(JRExporterParameter.JASPER_PRINT, print);
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.