Report Windows

A report window is used for various kinds of reports that are based on a defined set specification, selection criteria, and sort. Reports can include various kinds of formatting, breaks, aggregates (e.g. subtotals), report and page headings and footings, and so on.

When you Edit one of these components, you specify various attributes that define all the above. Report components are not required to have a window.

On the left side of the edit window, a collection of buttons referring to the actions in report design provides easy access to those actions by selecting the appropriate button. Updating various parts of the report specification can also be done by selecting appropriate menu items or by double clicking on the relevant piece of reporting syntax displayed in the panel on the right.

Number to Process

You can limit the number of records from which you that are report. To report from all records, select the Report All Records check box. Alternatively, to report from a limited number of records, clear the Report All Records check box and enter a specific number of records. The latter option is useful when testing a report definition.

Report From

In this dialog, you define the parts of the database from which you report. In general, you can report from combinations of EntitySets, relationships, documents, and roles. The combination you use must constitute a correct Zim set specification. A set specification is a fully connected subset of your database schema -- EntitySets and documents and the relationships that connect them.

The available sources are shown on the left side of the window. At any time you can view lists of EntitySets, relationships, roles, or documents. To make an object one of the report components, select the object name and then select the Add button. Alternatively, double click on the object name. The selected object is added to the report component list on the right side of the window.

Previously selected components can be removed from the list by selecting the Delete Component button. At any time, you can test to see if the selected components form a valid set specification by selecting the Validate button.

Components

In this dialog, you define the parts of the database from which you report. In general, you can report from combinations of EntitySets, relationships, documents, and roles. The combination you use must constitute a correct set specification. A set specification is a fully connected subset of your database schema -- EntitySets and documents and the relationships that connect them.

The available sources are shown on the left side of the window. At any time you can view lists of EntitySets, relationships, roles, or documents. To make an object one of the report components, select the object's name and then select the Add button. Alternatively, double click on the object name. The selected object is added to the report component list on the right side of the window.

Previously selected components can be removed from the list by selecting the Delete Component button. At any time, you can test to see if the selected components form a valid set specification by selecting the Validate button.

To accept any changes you have made, select OK. Your choices are automatically validated. To discard changes, select Cancel.

Where

The Report Selection dialog enables you to define those records within the chosen report components on which you want to report. Selection is accomplished by a WHERE. In the Report Generator, a WHERE clause is composed of fields from the chosen report components, comparison operators (=, >, etc.), constants, boolean operators (AND, OR, etc.), and paired parentheses.

To add or update selection criteria, select the Add to Where button. To remove any existing selection, select the Clear Where button.

Add to Where

The WHERE clause is updated by selecting the Add to Where button in the Report Selection dialog. A new dialog is presented. The contents of this dialog depend on where you are in the WHERE clause. For example, if you have no WHERE clause, then the dialog offers you a choice of selecting a field, a constant, a left parenthesis, or the NOT operator since all WHERE clauses begin with one of these. If you select "field", another dialog appears in which you select the actual field name from all fields in all report components. If you select "constant", another dialog appears in which you can enter the constant's value.

As you make your choices, the WHERE clause syntax is updated in the Report Selection window.

At any point when you are at the end of a syntactically valid WHERE clause, you can select the Expression Complete button to return to the Report Selection dialog. You can add more syntax to the end of the WHERE clause at any time.

Sorting

The Sort By dialog enables you to define the report sort order of the report records. You can sort on any field within the report components in either ascending or descending order.

The available fields from all report components are displayed in a list on the left side of the window. To add a field to the list of sort fields, select the field in the left hand list and select the Add button. Alternatively, double click on the field's name.

By default, a field is sorted in ascending order. To change the sort order for a field, select the field in the Sort Fields list and then select the Change Sort Order button.

Sorting is done by the top-most field and then by the next field and so on. If you wish to stop sorting by some field, select it in the Sort Fields list and select the Remove Sort Field button.

Detail Lines

This section of the Report Program Generator lets you specify in detail the record layout of the information presented in the resulting report -- that is, which fields go in which column, using which format, size, mask, and so on.

On the left, you are presented with a list of fields from the objects that are being reported from. A field can be selected as a report column in the report detail line by selecting the field name and either selecting the Add action or double clicking on the field name. Already selected field names can be removed from the list of report columns by selecting the Remove Report Column button. The top to bottom order of the Report Columns list is the left to right order of fields in the detail line.

When a field is selected as a report column, default presentation characteristics are assigned. You can update these characteristics by selecting the Report Column Attributes button. Another dialog appears in which you can adjust the presentation attributes. In particular, you can specify if you wish to print the field, what the column heading should be, the column width, spacing from the previous column, the number of new lines to skip before printing this column, whether to skip to a new page first, whether the value is to be underlined, centered, or suppressed, whether long values are to be wrapped in the designated width, and a data mask.

Breaks

The Report Generator supports two levels of "breaks". A break occurs when a designated value changes. For example, a personnel report can include divisional subtotals and departmental subtotals within the divisional grouping. This is accomplished by defining a break on both division name and department name. The division break would be the major grouping and the department break would be the sub grouping.

In both cases, you are presented with a two-part dialog. At the top, you define if  and when a break is to occur. This field is also a sort field. For each grouping, you can define a heading (a title that appears at the beginning of each group) and whether each group should start on a new page.

At the bottom, you define the output that should appear after each group (the group footing). For each detail line field, you can output any or all of a group subtotal, a group average, a group count, a group minimum value, a group maximum value, and the field itself.

If you select OK, the changes you have made are saved. If you select Cancel, the changes are discarded.

Footings

The Report Generator supports report footings or summaries. These are values (e.g. field values, grand totals, etc.) that are to be output at the end of the report.

You are presented with a two part dialog. At the top, you can define whether you want footings at all, a heading (a title that appears at the beginning of the report footing) and whether the footing should start on a new page.

At the bottom, you define the output that should appear in the footing. For each detail line field, you can output any or all of a grand total, an average, a count, a minimum value, a maximum value, and the field itself.

Page Layout

This dialog provides the means by which the general page layout is defined. There are four main aspects of page layout:

Page Dimensions

This defines the page width (in characters) and the page size or height (in lines).

Margins

This defines the margins to be left at the edge of each page. You may define top and bottom margins as well as a left margin.

Pause

This define if the report generation is to pause at the end of pages. Use the default of 0 to mean "don't pause" since the report is written out to a file and pausing is not very useful in this case.

Columns

This defines the default number of columns left between items on each line.

Page Headings

The Page Heading dialog is used to define the format of text that is to appear at the top of every page. A page heading is composed of a heading string, a date, and a page number.

In this dialog, you can specify the heading string. The date can either default to the date on which the report is run or can be set to a specific date. The output format for the date can also be specified.