When using the Print Record or Print Selection command, you can suppress the print dialog box by
using the optional asterisk (*) or “greater than” (>) parameter. But what’s the difference between the two?
The * parameter uses the current print parameters that could be the default parameters or could be the ones
set by the SET PRINT OPTION or PAGE SETUP command. With this, the current print parameters can be
reinitialized. The > parameter uses the current set print parameter but it does not reinitialized the current print parameters. Thus, it is ideal for executing successive calls to Print Record or Print Selection while maintaining previously set customized print parameters.
To illustrate in the code below, the orientation of the page is set to landscape. When you use the >
parameter with the Print Record command, the landscape orientation will be maintained with the printing of
records within the loop. If you use the * parameter, the first execution of the Print Record command will
use the landscape orientation. But the next time the command is executed, it will be printed in portrait.
ALL RECORDS([Table 1])
SET PRINT OPTION(Orientation option ;2) ` option 2 : Landscape
For (i;1;Records in selection([Table 1]))
PRINT RECORD([Table 1];>)
NEXT RECORD([Table 1])
End for