net.sf.jasperreports.engine

## Interface JRDataSource

- All Known Subinterfaces:
    IndexedDataSource, JRRewindableDataSource
  All Known Implementing Classes:
    AbstractPoiXlsDataSource, AbstractXlsDataSource, AbstractXmlDataSource, ColumnValuesDataSource, ExcelDataSource, JaxenXmlDataSource, JRAbstractBeanDataSource, JRAbstractTextDataSource, JRBeanArrayDataSource, JRBeanCollectionDataSource, JRCsvDataSource, JREmptyDataSource, JRHibernateAbstractDataSource, JRHibernateIterateDataSource, JRHibernateListDataSource, JRHibernateScrollDataSource, JRJpaDataSource, JRMapArrayDataSource, JRMapCollectionDataSource, JRMondrianDataSource, JROlapDataSource, JRResultSetDataSource, JRSortableDataSource, JRTableModelDataSource, JRXlsDataSource, JRXlsxDataSource, JRXmlDataSource, JsonDataSource, ListOfArrayDataSource, Olap4jDataSource, SortedDataSource, XalanXmlDataSource, XlsDataSource

      public interface JRDataSource

  This interface represents the abstract representation of a JasperReports data source. All data source types must implement this interface.

  Every time a report is filled, an instance of this interface is supplied or created behind the scenes by the reporting engine.

  JasperReports provides default implementations of result set, bean collections and bean arrays data sources.

  Version:
    $Id: JRDataSource.java 7017 2014-04-15 10:18:40Z shertage $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getFieldValue(JRField jrField)` Gets the field value for the current position.
    `boolean` | `next()` Tries to position the cursor on the next element in the data source.

- - ### Method Detail

    - #### next

          boolean next()
                       throws JRException

      Tries to position the cursor on the next element in the data source.
      Returns:
        true if there is a next record, false otherwise
      Throws:
        `JRException` - if any error occurs while trying to move to the next element

    - #### getFieldValue

          java.lang.Object getFieldValue(JRField jrField)
                                         throws JRException

      Gets the field value for the current position.
      Returns:
        an object containing the field value. The object type must be the field object type.
      Throws:
        `JRException`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com