EXTREPORT
|
Syntax: |
EXTREPORT(<Report File>,<Index
File>,<Index Key>,<Variable for Errortext>)
|
||||||||
|
|
|
||||||||
|
Meaning: |
The function EXTREPORT creates a report from
an external report file. The data records of <Index File> are processed
in ascending order. In the report editor the report layout can be
written into a file with <ALT/X>. The created files can be edited with
the program Ebusreport.jar. This can be used in order to adapt forms with the
customer without having to change the programming. In the program the function EXTREPORT is then
called instead of the instruction REPORT . The file <Report File> must contain a
valid report layout. <Index File> specifies the Index File
and <Index Key> specifies the key that reads the Index File. The data records are
processed in ascending order. EXTREPORT returns the result 0 if no error
occurred, otherwise it returns one of the following error numbers. In the
case of an error the variable <Variable for errortext> contains the
detailed error text.
Just as internal reports, external report
file contains variables and macros. Since external reports can be changed
with Ebusreport.jar without having to regenerate the program, the following
rules must be considered: All macros and Index Files that are part of
the external report must also appear in the generated program. Therefore the ‘original
report’, from which the report file was created, should be in the program. When a report is adapted report fields can be
changed, deleted or added. If an Index File is used in the program, the
program automatically knows all Index File fields. It is different with
auxiliary variables. The program only knows those variables that are used in
the program. If a new auxiliary variable, which does not appear in the
program, is inserted into an external report, EXTREPORT returns error 9. In
order to prevent these kinds of errors, it is recommended to build a sort of ‘maximum
report’ into the program, from which all external reports can be created
without adding new auxiliary variables. External reports may only contain
one-dimensional auxiliary variables, multi-dimensional auxiliary variables
are not allowed. |
||||||||
|
Parameter: |
|
||||||||
|
Sample: |
/* Print customer from number 10000 ascending CUSTOMER.NUMBER = 10000 H% = EXTREPORT("rep7.dat",CUSTOMER,1,ERROR$) IF H% <> 0 THEN ERRORMES
= "Error: " + ERROR$ ENDIF |
||||||||
|
See also: |
|