Informix Error -4363: The report cannot skip lines while in a loop within a header or trailer.
Cause and resolution
The report cannot skip lines while in a loop within a header or trailer.
4GL needs to know how many lines of space will be devoted to the page header and trailer (otherwise it does not know how many detail rows to allow on the page). It cannot predict how many times a loop will be executed, so it has to forbid the use of SKIP statements in loops in the PAGE HEADER, PAGE TRAILER, and FIRST PAGE HEADER sections.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4363 fires when a SKIP statement appears inside a loop within PAGE HEADER, PAGE TRAILER, or FIRST PAGE HEADER — per the official guidance, 4GL needs to know in advance how
many lines headers/trailers occupy, and it can't predict how many times a loop executes.
- A
SKIPstatement inside a loop within a header/trailer section, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the loop, or move the
SKIPstatement outside it, so the header/trailer's line count remains statically predictable.
Examples
SKIP inside a loop in a page header
PAGE HEADER
FOR i = 1 TO 3
PRINT "Header line ", i
SKIP 1 LINE
-- -4363: loop iteration count isn't statically known
END FOR
Corrected
PAGE HEADER
PRINT "Header line 1"
SKIP 1 LINE
PRINT "Header line 2"
SKIP 1 LINE
PRINT "Header line 3"
Diagnostic Checks
- Check every loop inside a header/trailer section for a
SKIPstatement, and remove the loop or relocate theSKIP.
Related Errors / Related Topics
- -4362 — "The report cannot skip to the top of page while in a header or trailer." A
related header/trailer restriction, about
SKIP TO TOP OF PAGEspecifically rather thanSKIPinside a loop. - -4309 — "Printing cannot be done within a loop or CASE statement contained in report
headers or trailers." A closely related restriction, about
PRINTinside loops/CASEwithin headers/trailers.
A SKIP statement appears inside a loop within a header/trailer section — remove the loop or
relocate the SKIP.