Calling the Print Manager dialog to select printer

SelectPrinter()

Call Print Manager dialog to select a printer


SYNTAX

SelectPrinter(properties)

Calls the Windows Print Manager dialog enabling the user to select a printer. The function returns the name of the selected printer. If the dialog is cancelled, an empty string is returned.

The values of the properties are stored in the field properties, which should be an alphanumeric array.

Each element of the array stores a specific property. The properties are listed in <printer.h> (prefix PP_ ) together with the index value of the element which stores each property. They are explained in the documentation for the SetPrintProperty() function. Note that new properties may be added in the future.

A report can be run to the selected printer using the run report command, using the following form:

run report report_id to “printer:” + printer_name ppf = param_file

Options for the Windows Print Manager dialog are set by assigning flags to the Sculptor system variable sys.PrintOptions. These options mostly have the effect of hiding, disabling or selecting controls in the dialog window.


EXAMPLE

!temp Printer,,a30
!temp Properties,,a30[50]

     Printer = SelectPrinter(Properties)

RELATED TOPICS

Reports

Report functions