The format of the definition is put together in much the same way as a report definition with the exception that this format is two-dimensional. Instead of just going across the page with fields, the user can arrange the fields across and down the page. In this case the user can also mix text with the fields as required.
If you defined either the header or trailer as zero in the Title screen, then you will not be prompted to edit them.
What do you want to do?
Input of a numeric derived field.
Input of an alpha derived field.
Selection of the Header option will lead you to choose from the
Header or the Continuation-Header. The 'Header' will only appear on
page one of the format. The 'Continuation header' will appear on all
subsequent pages.
In the same way as there are two headers, you will find a choice of
two trailers. There is the Final Trailer and the Continuation
Trailer. The final trailer will only appear on the final page whereas
the continuation trailer will occur on every other page.
There is normally only one Body for the report. Selection of the
option will allow you to edit the main body of the Report/Letter.
Whether you are editing the Header, Body or Trailer the basic moves
are the same.
The area you are allowed to edit will depend on the settings for
width and depth made in the Title screen. Each area will allow input
of Text or inclusion of fields held in any of the files available to
the format.
To enter text you position the cursor and type accordingly. There is
no concept of word wrap so you should frame the text with some degree
of care.
To include a field in the format use the following procedure:
Position the cursor.
Press the <HOME> key.
Select the file that contains your field.
Enter or search for the field name required.
Depending on the type of field required, you will then be faced with
different prompts.
If you are entering an Alpha field onto the Format, the following
prompts will be given after entry of the field name.
The length of the field will be displayed, you may enter a different
field length if required but rest assured that the correct length
will appear as the default.
You will then be offered the choice of Formatted, Truncated or
Blank-Line or Suppress.
A formatted field will reserve a space on the line exactly the same
length as the field. Therefore if a 35-character field is included in
this style, the finished print will print with the field contained in
its own 35-character space. Nothing else will print in this area.
A truncated field differs in that the space taken up on the line is
limited to that required for the field value. Once the field is
printed, the next character or field on the line will be printed
straight away. In this way if a short field value is printed, it will
have the effect of moving the balance of the line to the left.
A Blank line field will print in the same way as a Formatted field
unless the content of the field is blank. In this condition the style
will cause the whole of the line to be blank.
Although the line is blank it will still count as a positive line on
the page count, it will NOT shift the following lines up.
A Suppress field will print in the same way as a formatted field
unless the content of the field is blank, in this case the line will
not be printed and the line count and line feed command to the
printer will be suppressed.
If you are entering an Alpha field onto the Format, the following
prompts will be given after entry of the field name.
The image to be used when printing will need to be agreed. The
default will be correct for the size of the field but you may wish to
make it either smaller or larger.
The normal reason for making it larger is to cater for large totals.
You will then be offered the choice of classing the field as either:
Ordinary Total Blank-Field Blank-line FOC-line
If the field is put onto the format as an ordinary field, then it
will print the field contents in a formatted manner whatever the
field value.
Please bear in mind that the whole of the image will be used in just
the way a formatted Alpha field works. If you have a very large image
you may wish to reduce it in order to reduce wastage of column space.
A Total field is normally only used on formatted documents such as
Statements or Invoices. This sort of field will print an accumulation
of the field value for each letter/format page printed.
The Blank field format will print an empty space in the position
normally taken by the field value, but only if the field value is zero.
The Blank line field will react in the same manner as an Alpha blank
field in that, if the field value is zero, the whole of the line will
be suppressed. It will still generate a line feed on the printed form
even if the printed characters are suppressed.
As an alternative to the Blank line or Blank field technique, you may
prefer to use the FOC line. This will print the text
"F.O.C." instead of printing "0.00".
Input of a Derived field is similar to that of a numeric field in
most ways.
You will notice two differences. Firstly the field will default to an
eight-character image. You may overtype this to your own requirements.
The second difference is that of an extra prompt, following the Ordinary
Total Blank-Field Blank-line FOC-line prompts you will also be
offered a Date prompt.
If this is selected then the system will calculate the date
equivalent to the field value and print it in date format. You may
use an 8 or 10-character format or, if preferred, you can use a
20-character format and have the date printed as a text field.
These will be entered in the same way as normal alpha fields with the
Formatted, Truncated, Blank-line and Suppress options.
Characters or fields typed in in the normal manner will display
according to the current printer set-up. You may wish to enhance the
appearance of the printed document by customising the character presentation.
The easiest way to do this is to use the '<' and '>'
symbols. Any characters printed after the '<' sign will be
sent to the printer in expanded mode. All characters on the same line
following the '<' symbol will be expanded until the '>'
symbol is used. The character expansion is cancelled at the end of
the line. Be aware that these symbols may not always work on laser printers.
Use of derived fields can add to the character customisation. The
user will need to study the printer escape commands required for the
printer to be used (these can always be found in the printer manual),
and insert these codes into a series of derived fields.
Examples:
Name.
=
BIG$
" ":!0_BIG$=HEX(0E)
SMALL$
" ":!0_SMALL$=HEX(0F)
BOLD$
" ":!0_BOLD$=HEX(1B45)
BOLDOFF$
" ":!0_BOLDOFF$=HEX(1B46)
BIGBOLD$
" ":!0_BIGBOLD$=HEX(1B450E)
SMLBOLD$
" ":!0_SMLBOLD$=HEX(1B450F)
Header
Trailer
Body
Editing the formats
Input of an Alpha field
Length
Formatted
Truncated
Blank Line
Suppress
Input of a Numeric field
Image
Ordinary
Total
Blank-Field
Blank-line
FOC-line
Input of a numeric Derived field
Input of an alpha Derived field
Character Formatting
The field names above should speak largely for themselves. They make the printer increase or decrease the size of the characters, add double strike or remove it.
You can include printer control codes for your own printer type by using the HEX codes found in the printer manual. You can combine more than one printer command in one statement.
Please be aware that the printer commands nearly all stay in effect until they are cancelled. Make sure you include the codes required to restore your printer.
Note: The escape sequences used in the example above should not be taken as accurate. You must check your own printer manual to confirm the structure of the codes you need to use.
Where required you may make use of a simple text copying utility. If a Header and Continuation header are to be the same for example, you can assemble one and then copy it into the other.
In order to do this follow the following steps.
Imagine a rectangle covering the area of the text you wish to copy. Position the cursor at the top left hand corner of the area and then press the 'RUN' key. (This is 'ALT-X' on a PC or CTRL-X if you are using WDW.)
Accept the ring menu prompt Start-block.
Position the cursor at the bottom left-hand corner of the area you wish to copy and press the 'RUN' key again. You are only able to copy complete lines.
Accept the End-block ring menu item.
At this point the area defined on the screen will be highlighted and the ring menu will now ask you if you want to either; Cut out the area (this will cut it out and put it into a past buffer so that you can place the cut text to another location) or Copy the area defined.
Select as required and then press <RETURN>.
If you have selected Copy you should now go to the area of the format you wish to copy the text to. This may be any of the following; Header, Continuation header, Body, Trailer, Final Trailer.
Once the cursor is positioned at the right place press the 'RUN' key again.
Take the Paste option from the ring menu. The text will now be copied onto the screen. Please note that when you copy text from this function onto the screen, extra lines will automatically be inserted onto the format in order to allow them to fit.
Any text already on the format will be moved down by the required number of lines and may be lost from the bottom of the format.
You may copy text from one format to another as long as you do not move back to the report generator main menu during the copying operation. If you do copy text into a different format definition, and field definitions are included in the copied lines, then please remember to check the order of the files on the dictionary screen - they must be the same in both reports.