| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== PRINT (print a report structure) ====== | [[previous read previous view record in sequence .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[printerdialog return chosen printer .htm|{{btn_next_n.gif|Next page}}]] | | || | | **PRINT** | **(**| //structure//| **)** | | | | | //report// ,//number//| | {{blk2blue.jpg|blk2blue.jpg}} | **PRINT** | Prints a report DETAIL structure. | | //structure// | The label of a DETAIL structure. | | //report// | The label of a REPORT structure. | | //number// | The number or EQUATE label of a report DETAIL structure to print (only valid with a //report// parameter). | The **PRINT** statement prints a DETAIL report structure to the Windows default printer or the destination specified by the user in the Windows Print... dialog. PRINT automatically activates group breaks and page overflow as needed. You must explicitly OPEN a REPORT before any of the structures may be printed. You cannot use the PRINT statement to explicitly print a HEADER or FOOTER section. **Example:** ** MEMBER()** ** MAP** **  BuildRpt** ** END** **BuildRpt PROCEDURE** **CustRpt  REPORT,PRE(RPT)** **Top        DETAIL,USE(?Top)   !Page header** **            !structure elements  ** **           END** **CustDetail DETAIL,USE(?Detail)       !Line item detail** **            !structure elements  ** **           END** **         END** ** CODE** ** OPEN(CustRpt)** ** !initialize any report variables here** ** ****PRINT****(RPT:CustDetail)        !Print order detail line** ** ****PRINT****(CustRpt,?Top)          !Print the Top DETAIL only** ** CLOSE(CustRpt)** **See Also:** [[page overflow 1.htm|Page Overflow]] [[break declare group break structure .htm|BREAK]] [[detail report detail line structure .htm|DETAIL]] [[prop flushpreview.htm|PROP:FlushPreview]] [[open open a data structure .htm|OPEN]]