User Tools

Site Tools


printerdialog_return_chosen_printer_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== PRINTERDIALOG (return chosen printer) ====== Previous pageReturn to chapter overviewNext page

PRINTERDIALOG( [title] [,flag] )

blk2blue.jpg

PRINTERDIALOG Displays the Windows standard printer choice dialog box to allow the user to select or configure a printer.
title A string constant or variable containing the title to place on the file choice dialog. If omitted, a default title is supplied by Windows.
flag A numeric constant or variable which displays a target Print dialog based on the flag's value:
0 = Choose Printer dialog
1 = Print Setup dialog
2 = Page Setup dialog

The PRINTERDIALOG procedure displays the Windows standard printer choice dialog box, Print Setup dialog, or Page Setup dialog based on the flag value and returns the printer chosen by the user in the PRINTER “built-in” variable in the internal library. This sets the default printer used for the next REPORT opened.

PRINTERDIALOG returns zero (0) if the user pressed the Cancel button, or one (1) if the user pressed the Ok button on the dialog.

Return Data Type:     SIGNED

Example:

CustRpt REPORT,AT(1000,1000,6500,9000),THOUS,FONT('Arial',12),PRE(Rpt)

        !Report structures and controls

       END

CODE

IF NOT PRINTERDIALOG('Choose Printer')

 RETURN                 !Abort if user pressed Cancel

END

OPEN(CustRpt)

See also: PRINTERDIALOGA

printerdialog_return_chosen_printer_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)