As described in Chapter 5, data sources implement the DataFactory
interface which returns a TableModel
, representing the data used to populate the report. Pentaho Reporting defines an extension to TableModel
, called MetaTableModel
. This extension to TableModel
allows the report to query column and cell-level metadata, allowing for customization of styles dynamically based on the data source.
One example of this implementation is the Pentaho Metadata DataFactory
. As described in Chapter 5, Pentaho Metadata allows business users to build queries and select data without requiring knowledge of SQL or the underlying database schema. Along with those capabilities, it is also possible to attach style attributes to business columns. For example, metadata information can be fed into Pentaho Reporting to manage the formatting of a number within a report, or to adjust the font styles of a column within a report.
Most implementations of metadata define their metadata...