Class Data Source

  • Last update:August 07, 2026
  • 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();

    Index

    Attachment List


    Theme: Secondary Development
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy