Sample 1.1 (TR)


- Simple summary report setup.
- Custom terms.
- Scope setup.
- Date scale grouping.

Project file:  InstallDir/Samples/TARGET Reports/1.1

Let's start by creating an empty report element by double-clicking on the Table Setup resource template or by dragging and dropping it onto the page. (See Step I for details)  Now we can connect the report element to an input data source (the sample NorthWind database located in InstallDir/Samples/NorthWind.mdb).

 - Launch the database connectivity dialog by pressing the Open Data Source button on the report element () or Open Data Source button on the Data Source property editor ().

 - Select the "File" tab on the database connectivity dialog.

 - Select a folder where your database file is located ("Samples" folder).

 - Select a database (NorthWind.mdb database).

 - Select a database table ("Orders" table).

 - Click "Open" to connect to the data source.

After the input data source is initialized we can start manipulating the database fields to define a reporting scope, custom fields, and report setup.

Switch to the Scope property editor to define the scope for the reporting element.

 - Drag-and-drop as many fields as you need to define your filtering criteria

 - Select a logical operation for each field

 - define a constant value or another field for a binary logical operation

 - enter an arbitrary SQL expression for scope definition if you need a query beyond the one that can be provided in steps 1 - 3.  (See Scope property editor)

Now we are going to create a simple calculated field which converts a USD price to GBR price. (See dictionary editor)

 - Enter a name for the new calculated field: Price GBR

 - Provide a definition for the new calculated field as "Freight * 0.56"

The next step is to set up the grouping and reporting fields.

 - Drag-and-drop the "Region" field to define the first grouping level.

 - Drag-and-drop the "Order Date" field to define the second grouping level.

 - Drag-and-drop the "Price USD" and "Price GBR" to define reporting fields.

 - Drag-and-drop aggregate functions for statistical calculations over a reporting field. (See aggregate functions description)

The report setup is ready. However, before we generate the report, let's use an auto date scale for the second grouping level.

Switch to Group/Scale property editor, select "Order Date" in the "Group" combo box or just highlight it in the report element.

 - Select the scale type (in our case, an Automatic scale).

 - Select an appropriate range unit (Quarter).

The scale setup is finished.

To add a graphic presentation of the report, let's copy and paste the table report element (select the report element, press Ctrl+C, Ctrl+V or drag and drop the element while pressing Ctrl) and convert the copy to a Line Graph. (See Layout Types)

Click  the Run button on the toolbar to generate the report.

Related Sections