Overview
FineReport reports can use data from databases, text files, and other data sources.
The SimpleTableData abstract class defines data source-related properties and methods. To customize a class dataset, you can extend the SimpleTableData class when defining your class and then use the methods of this class to define a class dataset. After the class dataset is defined, FineReport can read and use it as a report data source.
FineReport supports class datasets. After customizing a class, you can add a class dataset in the dataset area, as shown in the following figure.
For a simple example, see Simple Class Dataset.
The SimpleTableData abstract class mainly provides the following two methods:
Initializing the column name array:
/**
* Initializes the column name array.
*
* @return {col1,col2,col3...}
* @throws TableDataException
*/
public abstract String[] initColumnNames();
Loading data:
/**
* Loads data.
*
* @return row and column data.
*/
public abstract List<Object[]> loadData();