Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRDataSource


    if (report == null) {
      throw new IllegalStateException("No main report defined for 'fillReport' - " +
          "specify a 'url' on this view or override 'getReport()' or 'fillReport(Map)'");
    }

    JRDataSource jrDataSource = null;
    DataSource jdbcDataSourceToUse = null;

    // Try model attribute with specified name.
    if (this.reportDataKey != null) {
      Object reportDataValue = model.get(this.reportDataKey);
View Full Code Here


      throw new IllegalStateException("No main report defined for 'fillReport' - " +
          "specify a 'url' on this view or override 'getReport()' or 'fillReport(Map)'");
    }

    // Determine JRDataSource for main report.
    JRDataSource jrDataSource = getReportData(model);
    if (jrDataSource != null) {
      // Use the JasperReports JRDataSource.
      if (logger.isDebugEnabled()) {
        logger.debug("Filling report with JRDataSource [" + jrDataSource + "].");
      }
View Full Code Here

    if (report == null) {
      throw new IllegalStateException("No main report defined for 'fillReport' - " +
          "specify a 'url' on this view or override 'getReport()' or 'fillReport(Map)'");
    }

    JRDataSource jrDataSource = null;
    DataSource jdbcDataSourceToUse = null;

    // Try model attribute with specified name.
    if (this.reportDataKey != null) {
      Object reportDataValue = model.get(this.reportDataKey);
View Full Code Here

  public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, JRDataSource ds) throws JRException {
        return generateJasperPrint(dr, layoutManager, ds, new HashMap());
    }

  public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, Collection collection) throws JRException {
    JRDataSource ds = new JRBeanCollectionDataSource(collection);
    return generateJasperPrint(dr, layoutManager, ds, new HashMap());
  }
View Full Code Here

    JRDataSource ds = new JRBeanCollectionDataSource(collection);
    return generateJasperPrint(dr, layoutManager, ds, new HashMap());
  }

  public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, ResultSet resultSet) throws JRException {
    JRDataSource ds = new JRResultSetDataSource(resultSet);
    return generateJasperPrint(dr, layoutManager, ds, new HashMap());
  }
View Full Code Here

  public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, JRDataSource ds) throws JRException {
        return generateJasperPrint(dr, layoutManager, ds, new HashMap());
    }

  public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, Collection collection) throws JRException {
    JRDataSource ds = new JRBeanCollectionDataSource(collection);
    return generateJasperPrint(dr, layoutManager, ds, new HashMap());
  }
View Full Code Here

    JRDataSource ds = new JRBeanCollectionDataSource(collection);
    return generateJasperPrint(dr, layoutManager, ds, new HashMap());
  }

  public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, ResultSet resultSet) throws JRException {
    JRDataSource ds = new JRResultSetDataSource(resultSet);
    return generateJasperPrint(dr, layoutManager, ds, new HashMap());
  }
View Full Code Here

  }

  private JasperPrint fill(Report report) throws JRException {
    JasperReport jr = loader.load(report);
    Map<String, Object> parameters = getParameters(report);
    JRDataSource datasource = getDataSource(report);
    decorate(report);
    JasperPrint print = JasperFillManager.fillReport(jr, parameters, datasource);
    return print;
  }
View Full Code Here

  public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, JRDataSource ds) throws JRException {
        return generateJasperPrint(dr, layoutManager, ds, new HashMap());
    }

  public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, Collection collection) throws JRException {
    JRDataSource ds = new JRBeanCollectionDataSource(collection);
    return generateJasperPrint(dr, layoutManager, ds, new HashMap());
  }
View Full Code Here

    JRDataSource ds = new JRBeanCollectionDataSource(collection);
    return generateJasperPrint(dr, layoutManager, ds, new HashMap());
  }

  public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, ResultSet resultSet) throws JRException {
    JRDataSource ds = new JRResultSetDataSource(resultSet);
    return generateJasperPrint(dr, layoutManager, ds, new HashMap());
  }
View Full Code Here

TOP

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

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.