The Report Generator allows you to organise data how you want it on the report, such as determining calculations for numeric tables or personalising column headings. You can leave space between fields or truncate fields to save space. Specify your formatting using the tabs on the Standard Print Banner Form.
Note: The Format tab is used with display, print, export and mail output types. There is a separate Format tab when the chart output type is used.
What do you want to do?
The format tab can be up to 255 characters wide. The structure of the
format tab will depend on the format spacing type selected on the
title tab.
If either S or D are selected, a single line per record output will
be the result-either Single or Double spaced. If M is selected
multiple format lines can be used as follows:
The user is able to merge text and column values in any part of the
format. If multiple lines are to be used the spacing field in the
Title tab must be set to 'M'ulti.
Derived fields can be created without leaving the format tab by
clicking the Derive button.
When the Edit field definition form is displayed the following
information is required to have the data fields inserted onto the
format line.
Table: Type (or select from the drop-down menu) the name of the table
that contains the data field you wish to appear on the format. Only
those tables defined on the tables tab are available here, together
with whatever derived fields may be available.
Column: Once the table is chosen, the
desired Column name can be loaded into the Column box. Type in the
column name, or part of the name or description and key TAB. If there
is only one match it is selected for you. If there is more than one
match the system presents the selected columns and allows you to
choose the one you need. The type of column chosen will change the
way the balance of the Edit field definition form is completed
depending on whether the column contains an alpha, numeric or derived
numeric value.
Occurrence: If the selected field has
multiple occurrences within the data structure, then the occurrence
to be used on the format must be input. For example, if we wished to
display a bin number field in the stock table - since the system
holds nine such bin locations, we would have to tell the system which
one of the nine to use.
Note: This field is unavailable unless a multiple occurrence
field is chosen.
Heading: Once the field is selected,
this box is filled in with the full field description held by
the system. If the selected field is a derived field, then a
descriptive name will need to be supplied. In either case, the
heading may be amended as required because in certain circumstances,
a small field may have along description which could be truncated for
the purposes of the report display. When the field is transferred to
the format, headings for numeric fields are left justified above
the field while date and alpha fields are right justified.
Image: If the field being added is
numeric, then the image field is enabled, and the number of
characters which is printed is illustrated by the use of a #
symbol. The default image defined by the system will initially be
shown. Accept the image or edit as required. If a derived numeric
field is being added, the print image to be used must be supplied.
Numeric images vary depending on the type of field being input. If
the number being used will never be negative, there is no need to
include the preceding minus sign in the image. If there is a chance
that the value contained in the field could be negative, then a minus
sign should be included at the start or end of the image. The report
will display a minus sign if the data value is negative.
Decimal places must be preceded by a full stop, followed by a number
of hashes that represent the number of decimal places to be
displayed. If the number will always be a whole number, there is no
need to include the full stop. A comma can be used in the correct
position to separate thousands or millions.
Acceptable images are as follows:
a
######
(6.0)
b
-######.##
(-6.2)
c
######.##-
(6.2-)
d
-###,###.##
(-3,3.2)
e
-######
(-6.0)
Edit Field Definition Form
The only characters allowed when formatting a numeric field are a hash, a minus sign, a comma and a full stop.
Image sizes for totals: A point worth remembering is that whatever image is used, the Report Generator will use the same image to print totals, so make sure the image is long enough to display totals. If the image used is not big enough to show the number required, the system will only produce hashes or pound note signs on the print. If this is seen on a report, then edit the format to make the image larger.
Length - Alpha fields: If the field being added to the format is a date field or an alpha field, then the appearance of the image as regards minus signs or commas is unimportant, the system only needs to know how long it is.
After editing the heading, the system will simply ask you how long the image should be. The number shown is the maximum length of the chosen field, it can be made shorter or longer by simply overtyping the number. The number of characters held in the field will not exceed the maximum length of the field, so there is probably little use in making it longer.
Length - Date fields: When a date field is added to the format, you may choose from two different field lengths. Enter 10 to use the format DD/MM/CCYY or use 8 to use the format DD/MM/YY.
Blank: This is a check box. When set to a tick the field is blank if the data value of the field is zero. This is provided so that columns of zeroes can be avoided on report formats.
Total: Some numeric fields will offer you the chance to produce totals. Enter a tick or leave the check box blank according to the choice to be made. The totals will show the accumulation of the field being added at the bottom of the report, as well as at any section break points where totals have been defined. The totals at section break points within the report are defined in the Sequence tab.
The totals shown at section break points will show the accumulation of the field for only that section of the report, while the totals at the base of the report will show the accumulation for the whole report. The only time when an accumulated total will not be shown is when certain derived fields are going to be recalculated.
Re-calculate: Some derived fields can be re-calculated at totals. Enter a tick or leave the check box blank as required. The idea of recalculating a field at totals is provided in order to allow averages to be included at the bottom of a section instead of showing an accumulated total. As a general rule of thumb, all derived fields that are working out percentages will recalculate successfully. Other derived fields which need to be recalculated will have to be specifically designed for the purpose. An example of recalculating percentage fields is shown below:
Sale Price |
Profit |
%Profit |
%Profit(2) |
1000.00 |
200.00 |
20.00 |
20.00 |
1200.00 |
210.00 |
17.50 |
17.50 |
1050.00 |
230.00 |
21.90 |
21.90 |
1500.00 |
250.00 |
16.67 |
16.67 |
950.00 |
195.00 |
20.53 |
20.53 |
--------------- |
------------- |
------------- |
------------- |
5700.00 |
1085.00 |
96.60 |
19.04 |
The calculation to work out the profit is PROFIT/SALE*100.
The derived field profit appears twice in the above example, once as it would be as an accumulated total (%Profit), and once as it would appear if it were recalculated at totals (%Profit(2)). The recalculation causes the Report Generator to process the derived field again using the figures for sale and profit which appear at totals rather than those for an individual record.
Buttons:
OK: Accepts any editing and insertion of fields and returns you to the Format tab.
Cancel: Concludes any editing and insertion of fields without accepting and returns you to the Format tab.
Delete: Deletes the Field currently displayed.
Help: Displays help on the application in your default company browser.
Note: The Multi line format is discussed in detail further on in this topic.
The edit field definition form.
On entry to the format tab, if Single line format was chosen on the title tab, then two lines are available on which to design the report output.
The top line is reserved for the field definition headings - ie the report column headings-and the second line for the actual fields we wish to have displayed on the report.
Scroll bars allow horizontal movement across the 256 available columns.
To embed a field into the format:
The EDIT FIELD DEFINITION form is displayed.
To amend the print image of one of the fields on the report format:
The EDIT FIELD DEFINITION form is displayed.
Note: If the image is being made longer, you must make sure that there is enough space after the field to accommodate the extra characters being inserted. Do not add more characters than space allows, otherwise the fields will overlap and the format line is corrupted.
To Delete a field from the format:
The EDIT FIELD DEFINITION form is displayed.
The print image is removed from the format line. You will have to use the cursor keys or mouse to move to the heading line and remove the heading separately.
Tip: You may find a quicker way to delete a field is by positioning the cursor within the print image of the field to be deleted and then keying ALT + D twice.
The format line can be edited at any time to include new fields. Adding a field to the end of the line is the same procedure as described earlier. Adding a field in the middle of the line is a little different. The main thing to watch out for is that there is enough room on the format line for the new field to be included. If there are only three spaces between two fields, then there is little point in inserting a ten-character field between them as the format iscome corrupted.
Before a field is added to the middle of the format, it is necessary to create enough additional space to allow the field to be added without overlapping.
To create additional space in the format line:
Tip: An alternative way of creating space is by positioning the mouse cursor at the point where the additional space needs to be added and keying ALT + I.
Once fields have been inserted onto the format, it is possible to edit the description lines relating to those fields.
To edit the text on the heading line:
Subtotals and totals in multi-line reports.
If Multi line spacing format was chosen on the title tab, then the Multi line format parameters area of the title tab becomes available for edit.
To define the six parameters concerning multi line output:
The FORMAT SIZE form is displayed.
Each of these parameters specifies the number of vertical print lines to be used by each individual section of the report. This structure allows both field definitions and text to be inserted on the output lines to make certain reports more readable.
Page header: This specifies the number of lines to be used for the main report heading. This are printed at the top of each new page in the case of a printed report or at the top of the display form in display mode. It would not be usual to insert individual field definitions here and the area should be reserved for text.
Tip: In most reports this parameter would remain at the default setting of one.
Sub-heading: As previously discussed, it is possible within Report Generator to break the output of the report when data within a specified field changes. With single line output reports this facility is controlled within the Sequence tab, but in multi line reports this is controlled in the format itself. The subheading may be as many lines deep as required to produce the desired output.
Line: This parameter determines the number of output lines which is used by each record that Report Generator outputs. If two was the number specified here than Report Generator would reserve two out put lines for each data record it printed or displayed. Using multiple lines in this area would be useful in producing an output such as may be required for an account listing, where it is not practical to output the name and multiple lines of address on a single line. It would be better perhaps to output each account as follows:-
In the above instance, it would be necessary to specify six lines.
Sub-total: This specifies the number of lines to be used for the subtotal that can be printed at the end of each record or section of records.
Note: Subtotals will only be produced by the system if the subtotal check box was checked when the field definitions were inserted onto the format.
Grand total: This specifies the number of lines to be reserved for the report total that can be printed at the end of the report.
Note: A final total will only be produced for those fields which were set to be totaled (subtotal box checked) when the field definitions were inserted onto the format.
Line width: This specifies the width available to the report for each record. The limitation to this is often simply the paper size in the printer. Horizontal scroll bars are drawn for display reports which exceed the standard screen width. 265 characters is the maximum width of the report output.
Buttons:
OK: Applys any changes that you have made to the Format size form and returns you to the Format tab.
Cancel: Cancels any changes you have made to the Format size form and returns you to the Format tab.
Help: Displays help on the application in your default company browser.
When using multiple line formatting, the structure of the format tab changes to accommodate the selection made in the title tab, each section expanding to reflect the number of lines chosen in the parameter setting. Scroll bars are used to position the screen if required.
For clarity, five of the parameters are colour coded within the format tab and a key to the colours used is displayed for reference at the bottom of the tab.
Note: When multi-line outputs are used and totals and subtotals are required, it is necessary to insert the fields to be totalled into the subtotal and/or total format line as well.
This action is not required in single line output reports as the system automatically utilises the single line format to produce the subtotal and total lines.