| **Navigation:**  [[introduction.htm|Language Reference]] > 7 - Reports > Report Structures >====== Page Overflow ====== | [[report declare a report structure .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[break declare group break structure .htm|{{btn_next_n.gif|Next page}}]] | | || **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:** [[close close a data structure .htm|CLOSE]], [[open open a data structure .htm|OPEN]], [[endpage force page overflow .htm|ENDPAGE]], [[print print a report structure .htm|PRINT]] **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)**