Informix Error -8127: You cannot use more than one REPORT TO statement in a report specification.
Cause and resolution
You cannot use more than one REPORT TO statement in a report specification.
The entire report is directed to one destination, which is chosen with the REPORT TO statement in the OUTPUT section. The report cannot be divided between multiple destinations, so remove all REPORT TO statements after the first. If you want to produce separate report files for different sets of data, perform one of the following steps:
* Write a separate report for each set of data (the specifications should differ only in their SELECT statements).
* Produce a full report, but with sets of data on separate pages, and use operating-system utilities and tools to separate the files afterward.
* Use parameter variables in the SELECT statements so that you can choose a subset of data dynamically, when you run the report, and use REPORT TO PRINT so that you can set the DBPRINT variable to control the output destination before you start the report.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8127 fires when a report specification has more than one REPORT TO statement — per the
official guidance, the entire report is directed to a single destination.
- More than one
REPORT TOstatement in theOUTPUTsection, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove all
REPORT TOstatements after the first, per the official guidance. - To produce separate report files for different data sets, per the official guidance,
choose one of:
- Write a separate report per data set, differing only in
SELECT. - Produce one full report with data sets on separate pages, and split the output afterward using OS utilities.
- Use parameter variables in
SELECTto choose a subset dynamically at run time, withREPORT TO PRINTand theDBPRINTvariable controlling the output destination.
- Write a separate report per data set, differing only in
Examples
Multiple REPORT TO statements
OUTPUT
REPORT TO "orders.out"
REPORT TO "customers.out"
-- -8127: only one REPORT TO is allowed
Diagnostic Checks
- Check the
OUTPUTsection for more than oneREPORT TOstatement, and remove all but the first.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -8127 in this set yet.
A report specification has more than one REPORT TO statement — keep only the first.