In order for the report to work it must be compiled. This process generates a program that runs the report whenever necessary. Each time you change a report it has to be compiled again so that the program is updated with the changes made.
To check compilation errors
If errors have been made in the construction of the report, normally in the derived field section, then compilation errors are displayed.
Note: Although they look strange, the compilation error messages are quite easy to track. At the start of each line of the error message there is an indication of the location of the problem. A derived field name or perhaps a line of selection criteria is given. A message just below the displayed line indicates the location of the compilation error.
If no further errors occur you may then choose to:
The description is destroyed and you are returned to the Report ID prompt.
Warning: Make sure that you want to destroy the report before clicking on the Delete button.
Note: This option allows the report to be run from within the definition forms, rather than from the main module report menu. After the report is run, you are returned to the report definition process.
Tip: It is possible to save a report without compiling it. This is useful if you wish to save a report before all the relevant sections are completed.
Problems generally occur because you have forgotten to surround character values with quotation marks or, on selection, you forget to explicitly itemise the selection rules. The following entries would generate an error during compiling the report:
If a derived field such as this were typed in:
( !1_NAME = SMITH ? "YES" : "NO" )
An error would be generated because as well as surrounding the YES and NO with quote marks, you should have put similar punctuation around the name SMITH.
( !1_NAME = "SMITH" ? "YES" : "NO" )
This second version will not generate an error message.
A common error with the select tab rules is as follows:
!1_AREA >= "A001" AND <= "F001"
An error would be generated because for each item of selection there needs to be three components; a field, an operator and a value. In the above example there are two items of selection on one line and the field name is missing from the second. Therefore the following version would be correct.
!1_AREA >= "A001" AND !1_AREA <= "F001"