CREATE REPORT

From Recital Documentation Wiki
Revision as of 10:38, 23 October 2009 by Helengeorge (Talk | contribs)

Jump to: navigation, search

Purpose

Report Designer


Syntax

CREATE REPORT <filename> | (<expC>)


See Also

@...SAY, Function Keys, LIST, REPORT, SET DEVICE, SET PRINT, SET PRINTER, TREPORT


Description

The CREATE REPORT command activates the full screen Report Designer which is used to create report format files. The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. If no file extension is specified, then '.frm' is used.

The menu bar for the Report Designer can be activated by pressing the [MENUBAR] key. There are nine options available in the menu bar: <OPTIONS>, <GROUPS>, <COLUMNS>, <FIELDS>, <TRIGGERS>, <RESET>, <LOAD>, <SAVE> and <HELP>.


OPTIONS

The <OPTIONS> menu option is used to go to the Options Screen. This screen is used to define the report layout. You can provide the following information:


Item Description
Report heading Specify a heading of up to four lines of text that will appear centered at the top of each page. The optional HEADING clause of the REPORT command can be used to provide an additional heading above this.
Page width Specify the overall width of the report in characters.
Left margin Specify the left-hand indent.
Right margin Specify the right-hand indent.
# lines/page Specify the number of lines per page.
Double space report (Y/N)? Specify whether the report should be double-spaced.


GROUPS

The < GROUPS > menu option is used to go to the first Groups screen. This screen is used to define the report groups and subtotals. A maximum of ten group/subtotal expressions may be defined. The table must be indexed or sorted on the group/subtotal expression. You can provide the following information:


Item Description
Group/Subtotal on Specify the expression to group by. The [HELP] key will provide a popup choicelist of fields in the active table and open related tables.
Summary report only Specify whether the report should be a summary. The optional SUMMARY clause of the REPORT command can also be used.
Eject after each group/subtotal Specify whether the page should be ejected after completion of each group/subtotal.
Group/subtotal heading Specify a group/subtotal heading of up to four lines of text. This must be specified in order for the subtotal to be displayed. The value returned from the group/subtotal expression is displayed next to this heading.


COLUMNS

The <COLUMNS> menu option is used to go to the first Columns screen. The Columns screen allows you to specify Recital/4GL expressions that will be evaluated and output as the columns of the report. A maximum of 24 columns may be defined. The 'Columns Remaining' field is update automatically based on the columns defined and the specified page width. The semi-colon character is treated as a request for a new line. If expressions contain memory variables or alias pointers, these must be active when the report is run. The following information may be specified in the Columns screen.


Item Description
Column contents Specify the expression to be output. The [HELP] key will provide a popup choicelist of fields in the active table and open related tables.
Decimal places Specify the number of decimal places for numeric columns.
Total Specify whether the column, if numeric, should be totaled..
Field header Specify a column heading of up to four lines of text.
Picture Specify a picture template for the column. See the @…GET…PICTURE command for more information.
Width Specify the column width. If the specified width is less than the actual width of the evaluated expression, the result will be word-wrapped.


FIELDS

The <FIELDS> menu option is used to display a popup choicelist of fields from the active table. The [PAGE UP], [PAGE DOWN], [CURSOR UP] and [CURSOR DOWN] keys can be used to move to the required field. If related tables are open in other workareas, the [CURSOR LEFT] and [CURSOR RIGHT] keys can be used to move between the workareas. The [RETURN] key is used to select fields, the [EXIT/SAVE] key to save the selection and the [ABANDON] key to cancel the selection. If the command SET DESCRIPTIONS is ON, then the field descriptions are shown in the menu rather than field names. If fields are selected from tables other than the active table, they are prefixed with the alias pointer. No alias pointer is added to fields from the active table, so this must also be the active table when the report is run. All fields selected are automatically converted to character data types.

TRIGGERS

The <TRIGGERS> menu option is used to display a pulldown menu to allow the definition of report level triggers. Triggers are procedures executed when particular events take place. The name of the procedure to be associated with the particular trigger should be entered. Once the procedure name has been entered, the procedure itself can be created/modified by pressing the [HELP] key while the cursor is on the procedure name. This will display a popup editor to edit the <procedure>.prg file. Procedures can be associated with the following triggers:


Item Description
Prereport Called at the start of the report.
Postreport Called at the end of the report.
Pregroup Called at the start of a group/subtotal.
Postgroup Called at the end of a group/subtotal.
Prerecord Called after a record is read, but before it is processed.
Postrecord Called after a record has been processed.
Precolumn Called before a column is output.
Postcolumn Called after a column is output.


RESET

The <RESET> menu option reinitializes the current report format file to blank. This option deletes all existing definitions in the current worksurface.

LOAD

The <LOAD> option displays a popup choicelist with the names of existing report format files. Selection of a file causes that file's definition to be loaded into the current report format. This option deleted all existing definitions in the current worksurface.

SAVE

The <SAVE> menu option displays a dialog prompting for a filename. The format file will then be saved to this file.

HELP

The <HELP> menu option accesses the on-line help system.


Example

use patrons index names, events
create report concert
report form concert for event = "CONCERT"


Products

Recital Terminal Developer