Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JREmptyDataSource


            } else {
                throw new AssertionError("Objects of type: " + dataSourceObj.getClass() + " cannot be converted to a row in a " +
                                         "JRDataSource");
            }
        } else {
                dataSource = new JREmptyDataSource();
            }
            checkRequiredFields(config, dataSource, template.getReportTemplate());
            print = fillManager.fill(
                    jasperTemplateBuild.getAbsolutePath(),
                    values.asMap(),
View Full Code Here


    public Output execute(final Input input, final ExecutionContext context) throws Exception {

        JRDataSource jrDataSource = processInput(input);

        if (jrDataSource == null) {
            jrDataSource = new JREmptyDataSource();
        }
        return new Output(jrDataSource);
    }
View Full Code Here

    JasperPrint jasperPrint = null;
    JasperReport jasperReport = (JasperReport) JRLoader.loadObject(is);
    List fieldsList = reportData.getFieldsList();
    if (G4Utils.isEmpty(fieldsList)) {
      jasperPrint = JasperFillManager.fillReport(jasperReport, reportData.getParametersDto(),
          new JREmptyDataSource());
    } else {
      JRBeanCollectionDataSource jRDataSource = new JRBeanCollectionDataSource(fieldsList);
      jasperPrint = JasperFillManager.fillReport(jasperReport, reportData.getParametersDto(), jRDataSource);
    }
    return jasperPrint;
View Full Code Here

  private JRDataSource getDataSource(Report report) {
    if (report.getData() != null)
      return new JRBeanCollectionDataSource(report.getData(), false);
    else {
      logger.warn("You are willing to generate a report, but there is no valid datasource, using empty one");
      return new JREmptyDataSource();
    }
  }
View Full Code Here

    calendar.setTime(this.getStartDate());
    return calendar;
  }
 
  public JRDataSource getDataSource() {
    return new JREmptyDataSource();
//    List l = new ArrayList();
//    l.add("");
//    return l;
  }
View Full Code Here

        } else {
            if (jrDataSourceInstance != null && !jrDataSourceInstance.isUnsatisfied()) {
                return jrDataSourceInstance.get();
            }
        }
        return new JREmptyDataSource();
    }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JREmptyDataSource

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.