Package net.sf.jasperreports.engine

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


        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


                            dateFormat.format(System.currentTimeMillis())+"."+type);
                   
                    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
                    outputStream = res.getOutputStream();
                    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);
                    exporter.exportReport();
                }
                else
                {
                    throw new RuntimeException("Invalid report type: "+type);
                }
View Full Code Here

    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,out);

    // gera o relatório

    exporter.exportReport();

    // retorna o OutputStream

    return out;
    }
View Full Code Here

                                outStream.write(b);
        JRExporter csvExporter = new JRCsvExporter();
        csvExporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
        csvExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputByteArray);
        csvExporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, "UTF-8");
        csvExporter.exportReport();
                                outStream.write(outputByteArray.toByteArray());
      } else
      if (outputFormat.compareToIgnoreCase("XLS") == 0)
      {
                                returnResult = tempFolder + "readonly.xls";
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.