Provide the data source (GRW for Java)

A report is only as good as the data it serves. The data source defines where and how you get your data.

You are responsible for creating the code that serves as the data source. The Genero Report Writer expects XML; your data source needs to generate XML. You must define the data model and serialize it to XML. You can either generate the code using the Business Application Modeler, or you can write the code by hand.

For Java applications, we identify two different ways to specify the data source:
  • Create a data model.

    A data model involves plain old Java objects (POJO) using JAXB. The path is Data to POJO, then POJO to XML. The schemagen utility is then used to create the Data Schema (.xsd) file.

    To generate the data model, see Quick Start: Generate a Java report application.

  • Feed report data to a SAX content handler.
    The SAX content handler directly creates the XML data. POJO are not used.
    Warning:

    Because this method does not use POJO, you cannot use schemagen to create the data schema. The data schema must be written manually.