Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRDataSource


        // create empty order
        Order order = Order.create();
        order.setName(_("All projects"));

        // create empty subreport to expense sheets
        JRDataSource emptyES = new JRBeanCollectionDataSource(
                createEmptyExpenseSheetLineList(order));

        // create empty subreport to work report lines
        JRDataSource emptyWRL = new JRBeanCollectionDataSource(createEmptyWorkReportLineList(order));

        OrderCostMasterDTO emptyDTO = new OrderCostMasterDTO(order, emptyWRL, emptyES);
        return emptyDTO;
    }
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

        }


        //construct the dynamic report
        //final OgnlValueStack stack = _invocation.getStack();
        final JRDataSource ds = (JRDataSource)conditionalParse(dataSource, _invocation, JRDataSource.class);
        //final OgnlValueStackDataSource stackDataSource = new OgnlValueStackDataSource(stack, dataSource);

        // (Map) ActionContext.getContext().getSession().get("IMAGES_MAP");

        final HttpServletRequest request = (HttpServletRequest)_invocation.getInvocationContext().get(WebWorkStatics.HTTP_REQUEST);
View Full Code Here

                    jasperTemplateBuild.getAbsolutePath(),
                    values.asMap(),
                    connection);

        } else {
            JRDataSource dataSource;
            if (template.getTableDataKey() != null) {
                final Object dataSourceObj = values.getObject(template.getTableDataKey(), Object.class);
            if (dataSourceObj instanceof JRDataSource) {
                dataSource = (JRDataSource) dataSourceObj;
            } else if (dataSourceObj instanceof Iterable) {
View Full Code Here

    @Nullable
    @Override
    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

        for (Source source : this.sources) {
            source.type.add(rows, values.values, source);
        }

        JRDataSource mergedDataSource = new JRMapCollectionDataSource(rows);
        return new Out(mergedDataSource);
    }
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

    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

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.