Report objects generate formatted output from data in tables. The Report wizard and Report designer allow you to create and modify reports visually. Reports are saved as code in a .REP file that you can modify.

Measurements in reports default to twips (20th of a point). There are exactly 1440 twips per inch.

At the top of the report object class hierarchy is the Report class. A Report object acts as a container for four main groups of objects:

  1. Data objects, which give access to data in tables

Query objects

Database objects

Session objects

These objects are created and used the same way they are in forms, except that a report does not have a primary rowset like a form does.

  1. Report layout objects, which determine the appearance of the page and where data is output, or streamed

PageTemplate objects

StreamFrame objects

A Report object contains one or more PageTemplates, and each PageTemplate usually contains one or more StreamFrames.

  1. Data stream objects, which read and organize the data from a query’s rowset and stream it out to a report’s StreamFrame objects

StreamSource objects

Band objects

Group objects

Each StreamSource object contains a Band object that is assigned to its detailBand property. The contents of the detailBand are rendered for each row in the rowset. A StreamSource may also have one or more Group objects, which group data and have their own header and footer Band objects.

  1. Visual components—objects that display the report’s data

Text objects

Image objects

Line objects

Rectangle objects

Shape objects

CheckBox objects

RadioButton objects

These objects are created as properties of a PageTemplate object if they are fixed elements on the page, such as a report’s date and page number; otherwise they are properties of a Band object and are used to display data.

The primary method of displaying information in a report is through Text objects. For text that varies, such as the data from the rowset, the text property of the Text object is set to an expression codeblock, which is evaluated every time the object is rendered. By using an expression in the codeblock that accesses the fields in the rowset, the Text object displays data from tables.

You may use the other visual components in a report to display static images or images from a table, draw lines, or display table data with check boxes or RadioButtons.

Note

Visual component objects are used in forms as well as reports, and most of the properties, methods, and events associated with the objects are described in the Form objects series of topics. Some Text object properties used only in reports are described in this series.