Navigation: Language Reference > 13 - Built-in Functions >====== PRINT (print a report structure) ====== | |
( | structure | ) | ||
report ,number |
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: