Create the data model (C#)

The data model identifies where the data comes from.

What is a data model?

A data model is the hierarchy of memory classes that represent the data for the report application. A data model consist of one or more classes. The data model is serialized (converted to XML) to be sent to the Genero Report Engine.

Creating a data model

There are two approaches to creating a data model.
  1. You can generate the data model using the Business Application Modeler. It creates the classes and populates the classes using SQL. In addition, the data schema is created.
  2. You can write the data model by hand. When you manually create a data model, you are responsible for the code that creates and populates the classes.

The data model in Genero Report Writer

Within Genero Studio for Genero Report Writer, you can have up to three different representations of a data model:
  1. For generated applications, the Business Application Modeler creates a Data Model Diagram (.4rdj), a graphical representation of the data model. It is composed of one or more business records, which in turn represent the SQL queries that fetches the data.
  2. The Data Schema (.xsd) file is an XML schema file. It gives a tree view of the data model, written in XML.
  3. A set of classes is provided in the application source.

Feeding the data

If the data model is generated, the requisite SQL to feed the data model will have been created.

If the data model is handwritten, the code for feeding the data must also be handwritten, as discussed in the following topics: