Repgen R17
Repgen R17
Repgen R17
The Report Generator utility provides a mechanism for defining and producing ad hoc
reports, which can be run on-line or within the COB batch process.
The utility consists of four stages:
Setup
Creating a Report - REPGEN.CREATE
The REPGEN.CREATE application is the basic table that allows the user to modify or define
the layout and contents of a report.
The details defined here control features such as which data files are used for selection, the
sort sequence of the records, column positions and totals and so on (as shown in the below
screen shot).
The following sections briefly describe some of the main features and parameters that are
used in creating a report. More detailed explanation of the parameters and other advanced
features can be found in the HELPTEXT documentation.
Creating a Report
In the example the file is type 2 (numeric keys) and modulo 11 (11 * 2k=22k approx. size).
An approximate modulo can be calculated as:
Modulo calculation
From the result of this calculation, determine the next nearest Prime Number and use this
as the modulo.
In the example a value of 1 specifies that this field will be used as part of the sort
sequence.
If this is the only mnemonic in the whole report definition, which has a 'key.type' of
1, then it becomes the primary sort key. A secondary sort key can be established by
setting the 'key.type' to '1' on another mnemonic definition. Then the sort order is in
the order in which the mnemonics are defined.
Note: A mnemonic that is used for sorting does not necessarily have to be
displayed.
SPECIAL.MASK - Defines the output format for the data field, that is left, right justification,
special masks, date formatting and so on.
The example R###### shows that the customer number is to be right justified in a
field width of six characters.
A special feature of this field is that; if the name of a mnemonic, which is referencing
a currency field, is entered here, the report generator formats the data according to
the number of decimals in the currency table.
Fixed headers
The below screen shot illustrates how column headers can be defined for the report. Up to
four lines of heading can be defined.
Totals
The below screen shot illustrates how totals can be defined in the report. The example
totals the working balance for all accounts and displays the total per currency.
If this is set to value '4', then the data field is not displayed but only totalled. The
total is displayed in the total line.
In the example, it is set to '3' to print and total the working balance.
KEY.TYPE - Set to value '2' (total by change) or '4' (total and paging by change) to produce a
sub-total; whenever the value of the field changes.
In the example for CURR mnemonic it is set to '2' to produce a sub-total whenever
the currency changes. The sub-total is reset after display. A value of '4' has the same
function except that it performs a page break.
Note: It is important to sort the output according to the field being displayed in the
header.
Footer Text
The parameter fields used:
DISPLAY.TYPE - Value set to '6' (Footer) for CURR.FTR mnemonic to display the data field
defined in MNEMON.FIELD in a total line only.
TEXT - Contains the fixed text that is to appear as part of the total line. In the above screen
shot this is set as 'TOTAL FOR'.
Note: The DISPLAY.TYPE on the WBAL mnemonic (working balance) is set to value
'4' (total only), that is, this field is not displayed but only totalled. This has been
used instead of display type '3' (line and total) to prevent the footer text from being
printed on the next line after the sub-total. Another mnemonic is defined to print
the working balance on every line.
Blank lines
Blank lines can be inserted in the report for headers, totals and detail lines by setting the
following fields to the appropriate values.
ADD.BLANK.LINE
ADD.TOT.BLANK.LINE
EMPTY.LINE.WANTED
Groups
The Group facility within the Report Generator allows a single report definition to be sub-
divided into sections. The sub-division is performed according to decisions linked to each
group (section). In the example shown below, the report on the ACCOUNT file is divided into
two sections, Customer Accounts and Internal Accounts.
Grouping Facility
The parameter fields used:
GROUP - The number identifying the Group is set-up in
fields GROUP.TITLE to MNEMON.SEQU. In the example groups 1 and 2 are defined.
GROUP.TITLE - Title to be printed at the beginning of the group.
GH1.001..040 to GH4.121..132 - Header text for each group; up to four lines of heading can
be defined.
GROUP.DEC.NAME - Name of the decision that is to be used to control the selection of
records, which appears in the group. In the example the first group is linked to the
decision CUSTOMER.ACCT and the second group is linked to INTERNAL.ACCT.
NEW.PAGE.FOR.GROUP - This field can be used to force a page break when a new group
starts. And the RESET.PAGE.NO field allows the page numbering to be reset to one for the
start of each group.