Steps to a Report

This is an overview of the steps needed to create a report using Genero Report Writer. You are given the high-level process here; the details within each step are covered in other topics.

Prerequisite: Determine the reporting requirements

Identify what reports you wish to output. Don't think about the specifics around the look-and-feel of the report, but understand what data you intend to stream to the Genero Report Engine. Where does that data come from? How do you want to organize the data? Will you group or summarize by specific values? Will you need to accumulate values, in order to provide running totals or group summaries?

This step involves understanding your data, understanding how it is organized, and understanding how your end users want to view this data in their reports.

Organize the project workspace

If you are using Genero Studio to create your report program, start by creating and organizing your Genero Studio project workspace. In this project workspace, you define the project nodes - the applications, libraries, and virtual folders - needed to reorganize your files, specify dependencies, set build rules, and more.

Note: The options for creating the workspace are on the File > New menu, for example, File > New > Java > BAM Java Project (.4pw).

Provide the data source

A report program defines the data source through which data is streamed and serialized.

The data source can be generated and packaged as a library for inclusion into bespoke applications, using the Business Application Modeler (BAM). This is the recommended method if you are retrieving the data from a database and you want to generate the SQL data source.

If BAM does not meet your requirements, you can hand-code the data source using the APIs provided by Genero Report Writer.

Create the data schema

Once you have the data source defined, you can create the data schema. The data schema is an XML Schema Definition (.xsd) file that describes the structure of the data source. The data schema is needed by report designers, as it defines the structure of the data that will be streamed by the Genero Report Engine.

Create a report design

Two things are needed to create a report design: the Genero Report Designer and a data schema.

To create a new report, you can create a report from a template and then modify the report. Alternatively, you can start with an empty report and design the layout.
Note: If you are writing multiple reports using the same design, you might want to create and manage your own report templates.

Regardless of whether you are creating the report design document from scratch or from a template, you end with a .4rd report definition.

You need to associate the report design document with the data schema. The data schema defines the report triggers that specify what should be printed when a change in data occurs. By using the data schema, you do not need to be connected to the data source to create the report design.

Determine the report output

A report program defines two things: the data source through which data is streamed and serialized, and the report output options that define how the report is output. For example, the report can be output as a PDF, and XML file, an Excelâ„¢ spreadsheet, or sent directly to a printer.

The code regarding the report output must be hand-coded using the APIs.

Run the report program in a development environment

You can run the report program from within Studio for testing and debugging.

Integrate the report into your application

You must add some code to use it in your report application. You can include the class files you have created into a library to be used within other applications.

Unless the report design document is hard-coded within the report application, you provide a means for allowing the user to specify which report to create; a single report program can provide the data for many different report designs. As our demo application shows, you can also create a report program that allows the users to select how the report is output.