Informix Error -4417
-4417 This type of statement can be used only in a report.
Statements such as PRINT, SKIP, or NEED are meaningful only within the body of a report function, where there is an implicit report listing to receive output.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4417 fires when a report-only statement such as PRINT, SKIP, or NEED is used outside a
report function — per the official guidance, these are only meaningful within a report
function's body, where an implicit report listing exists to receive output.
- A report-only statement (
PRINT,SKIP,NEED, etc.) used outside a report function, per the official guidance — the direct, only cause.
Solutions / Resolution
- Move the statement inside a report function's body, or use the equivalent
non-report statement (e.g.
DISPLAYinstead ofPRINT) if a report wasn't actually intended.
Examples
PRINT used outside a report
FUNCTION summary()
PRINT "Total: ", grand_total
-- -4417: PRINT is only valid inside a report function
END FUNCTION
Corrected
FUNCTION summary()
DISPLAY "Total: ", grand_total
END FUNCTION
Diagnostic Checks
- Check whether the flagged statement is inside a report function's body, and use the equivalent non-report statement if a report wasn't intended.
Related Errors / Related Topics
- -4342 — "PAGENO and LINENO are allowed only in reports." A closely related restriction, about specific report-only functions rather than statements.
- -4426 — "The PRINT statement can be used only within reports." A closely related,
PRINT-specific version of this same restriction.
A report-only statement is used outside a report function — move it inside, or use the non-report equivalent.