WR PRINT MERGE
version 6.0
WR PRINT MERGE (area; table; display)
Parameter | Type | Description | |
area | Longint | 4D Write area | |
table | Integer | File number | |
display | Integer | Display/suppress the print settings dialog box |
Description
The WR PRINT MERGE command prints the document contained in area once for each record in the selection of table. table is the number of the merging table. If table equals 0, WR PRINT MERGE displays the standard Print Mailing dialog box, allowing you to specify the table and change the selection of records for that table.
If the document contains references, they will be automatically processed before printing.
In the display parameter, you can pass one of the following constants, found in the "WR Parameters" theme:
Constants (value) | Description |
wr no print settings dialog (0) | The Print Settings dialog box does not appear. |
wr with print settings dialog (1) | The Print Settings dialog box appears. |
Example
The following example prints a letter for each record in the [Clients] table. The letter is stored in a record of the [Letters] table.
ALL RECORDS (Clients]) `Selecting all clients
QUERY ([Letters];[Letters]Ref="Expedite") `Looking for Expedite template
Temp:=WR New offscreen area `Creating an offscreen area
WR PICTURE TO AREA(Temp;[Letters]Doc_) `Placing template in offscreen area
WR PRINT MERGE (Temp;3;wr no print settings dialog) `Merging the template with the selection in table 3
WR DELETE OFFSCREEN AREA (Temp) `Deleting the offscreen area
See Also