Navigation: Language Reference > 7 - Reports > Report Structures >====== Page Overflow ====== | |
Page Overflow occurs when the PRINT statement cannot fit a DETAIL structure on a page. This may be due to a lack of space, or the presence of the PAGEBEFORE or PAGEAFTER attribute on a DETAIL structure. The following steps occur during page overflow, in this sequence:
1.If the REPORT has a page FOOTER, it prints at the position specified by its AT attribute.
2.The page counter is incremented.
3.If the REPORT has a FORM structure, it prints at the position specified by its AT attribute.
4.If the REPORT has a page HEADER, it prints at the position specified by its AT attribute.
Related Procedures:
Example:
CustRpt REPORT,AT(1000,1000,6500,9000),THOUS,FONT('Arial',12),PRE(Rpt)
FORM,AT(1000,1000,6500,9000)
IMAGE('LOGO.BMP'),AT(0,0,1200,1200),USE(?I1)
END
HEADER,AT(1000,1000,6500,1000)
STRING('ABC Company'),AT(3000,500,1500,500),FONT('Arial',18)
END
Break1 BREAK(Pre:Key1)
HEADER,AT(0,0,6500,1000)
STRING('Group Head'),AT(3000,500,1500,500),FONT('Arial',18)
END
Detail DETAIL,AT(0,0,6500,1000)
STRING(@N$11.2),AT(6000,1500,500,500),USE(Pre:F1)
END
FOOTER,AT(0,0,6500,1000)
STRING('Group Total:'),AT(5500,500,1500,500)
STRING(@N$11.2),AT(6000,500,500,500),USE(Pre:F1),SUM,RESET(Break1)
END
END
FOOTER,AT(1000,1000,6500,1000)
STRING('Page Total:'),AT(5500,1500,1500,500)
STRING(@N$11.2),AT(6000,1500,500,500),USE(Pre:F1),SUM,PAGE
END
END !End report declaration
CODE
OPEN(CustReport)
SET(DataFile)
LOOP
NEXT(DataFile)
IF ERRORCODE()
BREAK
END
PRINT(Rpt:Detail)
END
CLOSE(CustReport)