Informix Error -4665: Warning: Report page header or trailer output must end with a newline, so a newline will be automatically appended.
Cause and resolution
Warning: Report page header or trailer output must end with a newline, so a newline will be automatically appended.
A report header or trailer contained a semicolon (;) at the end of the line. In the body of the report, a trailing semicolon suppresses the creation of a new line. The header and trailer must end with a new-line character to perform properly. The compiler has ignored the semicolon. To prevent this warning message from appearing, remove the semicolon from the source code.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4665 is a compiler warning: per the official guidance, a report header or trailer line ended with a semicolon, which in the body of a report suppresses the creation of a new line — but headers and trailers must end with a newline to work correctly, so the compiler ignored the semicolon and appended one automatically.
- A trailing semicolon on a report header/trailer line, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the semicolon from the source code, per the official guidance, to prevent this warning from appearing (the report's behavior is unaffected either way, since the compiler already appends the required newline).
Examples
A trailing semicolon in a page header
PAGE HEADER
PRINT COLUMN 1, "Order Report";
-- -4665: the trailing ";" is ignored, and a newline is appended anyway
Corrected
PAGE HEADER
PRINT COLUMN 1, "Order Report"
Diagnostic Checks
- Check report header/trailer lines for a trailing semicolon, and remove it to silence the warning.
Related Errors / Related Topics
- -4486 — "TEXT or BYTE variables and wordwrap fields cannot be printed in report headers or trailers." A related header/trailer restriction, about content type rather than line-ending punctuation.
A report header/trailer line ends with a semicolon — remove it; the compiler already appends the required newline regardless.