Genero Studio Overview: Report Writer

Genero Studio video scripts

Related video: Genero Studio Overview: Report Writer

The Genero Report Writer is a robust reporting solution for creating a variety of reports, from simple lists to complex reporting needs: invoices, business graphs, XML documents, any reports needed by a business.

The data for these reports was taken from a database by a Genero application; the report layout was designed in the Genero Report Designer, and they are being shown in the Genero Report Viewer.

[Slide: GST Overview: Report Writer]

With the Genero Report Writer, the gathering of the data for a report is separated from the report design. A Genero program is created to retrieve the data from a data source: a relational database, a data file, an XML file, or a Web service. The data is streamed in XML format from the Genero application to the Genero Report Engine, one record at a time.

A report design document, created using the Genero Report Designer, defines the layout of the report.

The Genero Report Engine formats the streaming data according to the report design to create the report pages. The report pages are displayed using the Genero Report Viewer, sent to a printer, saved as a PDF file or an image, or one of the other possible output options.

[Splash: The Report Data Wizard]

The data for the reports comes from a Genero program. The Genero Report Writer provides a wizard to assist in creating this application.

Select File >> New. Click Reports. Select Report from Database and click OK.

A New Query wizard opens.

Select the table or tables,

Define how the tables are related,

Define the columns to be sent to the report engine,

and specify the sort columns, which defines how the data is grouped, and ultimately how the report can be divided into its various groups or sections

Select Finish, and the wizard creates the SQL statements and report blocks that can be used by a reporting application.

[Splash: Report Design]

The Genero application streams the data, in XML format, to the Genero Report Engine. The engine needs to have the information on how to format the data for display. This information is provided by the Genero Report Design Document.

To create a report design document, select File >> New.

Select Reports.

Selecting Empty Report provides just that – an empty report. Selecting List Report uses a template to open a report design with the basic structure of a standard list report provided.

The report design uses containers to organize the layout of the report objects. The List Report template starts with Horizontal Box containers for the report header, the column headers, and the data rows. Additional containers can be added from the Tool Box to the report design.

Within the containers, other report objects are added: Word Boxes, Decimal Format Boxes, Image Boxes, Page Numbers, Charts, Bar Codes — the elements that display the data in the report.

What data is coming into the report is important to the report designer. The report application – the BDL application – can generate a schema file at compilation. The report design’s Data View uses the schema file to display how the data is organized (or grouped) and the data objects available to the report. Each data object corresponds to a database column or report variable from the reporting application.

To create a report with meaningful data, these data objects are placed within the layout containers. Data objects are added from the Data View to the report design. A list report typically include column headers, followed by rows of data. Icons on the Data View specify whether the value of a data object is being added, or the data object label – the field label or table column – is being added.

One method for adding a data object value is to select the container, and double-click the data object. Another method is to hold down the CTRL key and drag the data object onto the graphical report design. The preferred method will depend on the type of report and complexity of the report layout. Each data object is automatically enclosed in the appropriate type of Drawable – a Word Box or a Decimal Format Box, for example – depending on the data type.

These same methods are used to add the column titles to the container provided for the table header. Select the table header container, click the table column title object icon and place a column title for each of the columns in the report.

[Splash screen: Report Structure and Properties]

The Report Structure panel displays a tree of the objects in the report design: the containers and the data objects. At the top is the Page Header, which will print at the top of each report page.

The Report Structure also shows report triggers – shown as red dots – that triggers the printing of specific containers or details when the value of a data item changes. These triggers allow for the inclusion of page breaks or the printing of sub-totals when data switches to a new store or a new order.

The final trigger – the On Every Row trigger, will print its child objects once for every record passed to the report.

Part of the report design is organizing the report containers and data objects with the report triggers.

Text and images can be added to the report. From the template, a Word Box displays the report title. Change the title by changing the Text property in the Properties panel. For every object, the Properties panel lists all of the object’s properties, which can be changed as needed.

[Splash screen: Outputting the report ]

The Genero Report Writer provides a variety of output options: SVG format for the Genero Report Viewer, PDF, an image file, direct to the printer, to an excel spreadsheet, to an XML file, to a HTML file, and more. While the output can be specified in the report design document by selecting File >> Report Properties >> Output Configuration, it is more common to specify the output in the reporting application.

Report designs are saved as files with a 4rp extension. In the report application, the report design is called by name. When the report application executes, the data is sent to the report engine, and the report design document is used to format the report displayed in the report viewer.

This has been a quick look at the Genero Report Writer. There are a variety of sample reports installed with Genero Report Writer, and additional training videos provide a more detailed look at creating a rich variety of reports.