Package net.sf.jasperreports.export

Examples of net.sf.jasperreports.export.Exporter


   
    ByteArrayOutputStream output = new ByteArrayOutputStream();
 
    try {
     
      Exporter exporter = setup();
     
      ExporterInput exporterInput = SimpleExporterInput.getInstance(printList);
      exporter.setExporterInput(exporterInput);
     
      ExporterOutput exporterOutput = getExporterOutput(output);
      exporter.setExporterOutput(exporterOutput);

      ExporterConfiguration exporterConfiguration = getExporterConfiguration();
      if (exporterConfiguration != null)
        exporter.setConfiguration(exporterConfiguration);
     
      ReportExportConfiguration reportConfiguration = getReportConfiguration();
      if (reportConfiguration != null)
        exporter.setConfiguration(reportConfiguration);
     
      exporter.exportReport();
      Flushables.flushQuietly(output);
      return output.toByteArray()
     
    } catch (JRException e) {
      throw new RuntimeException(e);
View Full Code Here


            outputStream = getOutputStream();
            final String ftype = outputType == null ? DEFAULT_OUTPUT_TYPE : outputType.toLowerCase();
            final JRDataSource jrDataSource = getJrDataSource();
            final Map<String, Object> reportParameters1 = getReportParameters();
            final Exporter exporter = getExporter();

            if (exporter != null) {
                //injected Exporter instance should already set appropriate ExporterOutput, so pass null to fillAndExportReport(...)
                fillAndExportReport(templateInputStream, reportParameters1, jrDataSource, exporter);
            } else {
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.export.Exporter

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.