Collections

A report created in the JADE Report Writer Designer application must include at least one root collection or a view join between root collections defined in the configuration phase for the view on which the report is based. A report can return data only on objects that can be accessed through its root collection (or collections) or view join (or joins).

A JADE collection is a basic structure used to contain multiple references to similar objects. To access the contents of a root collection, the JADE Report Writer uses a root collection path. A collection path is constructed by selecting the features of objects that reference collections (such as a reference property Company.firstInstance.allClients, by which a Company object references its collection of Client objects) or by specifying all instances of a class.

When you have defined the features and types for a reporting view, you then specify the root collections to be used for reporting by defining their root collection paths. The collections available for your reports are limited to those collections and objects (types) that have been included in the reporting view.

In most cases, a report requires only one collection, as all required data is accessible by traversing object references (for example, Employee::myBranch.description or Company::allCustomers.name). In other cases, you may have to join two unrelated member classes to produce the data required for a report. A special case is one where a report requires a ‘self-join’, in which case a collection can be selected more than once with an alias being assigned to each usage of the collection.

Before you build the root collection path to the JADE root collection, you must set up the types (classes) and features (properties and methods returning data to report) of the objects that can be accessed from the root collection. You can then report on all data that can be navigated to from this collection.

As the building of the root collection path completes the JADE Report Writer configuration, the report is then ready to be designed. For details, see Chapter 3, "Configuring the JADE Report Writer".