Package net.sf.jasperreports.engine.export

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


        + "." + EXPORT_FORMAT.XLS.toString().toLowerCase());
    exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);
    exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
    exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
    exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
    exporter.exportReport();
 

}
View Full Code Here


               exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, print);
              exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, outputByteArray);
              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();
                                outStream.write(outputByteArray.toByteArray());
      } else // PDF by default
     
                                returnResult = tempFolder + "readonly.pdf";
                                outStream = new FileOutputStream(new File(returnResult));
View Full Code Here

      response.setContentType("application/vnd.ms-excel");
      response.setHeader("Content-Disposition","attachment; filename=\""+ "Accounts.xls" + "\"");
      JRXlsExporter exporterXls = new JRXlsExporter ();
      exporterXls.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
      exporterXls.setParameter(JRExporterParameter.OUTPUT_STREAM, outStream);
      exporterXls.exportReport();
    }
   
    outStream.flush();
    outStream.close();
  }
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.