Equinox Online Help - Language Reference - A to Z
ChoosePrinter |
|
---|---|
Applies to | |
Syntax | ChoosePrinter [how, name, orientation, size, source, copies, file] |
Action | [Statement] Launches the Windows Print dialog. |
Scope | Only usable in report methods. |
Notes | A parameter which is missed out or supplied as -1 is ignored and the value from the report file is used instead. The command PrinterSettings returns the current values. How:
Name:
Orientation:
Size:
Source:
Copies:
File:
After the command has executed, SysError is zero unless an error has occurred: SysReply contains one of the following values:
When Equinox executes the report, it tries to attach to the printer requested. If the printer is not available for any reason, Equinox displays the following dialog: The operator can choose another printer or cancel the report. The 'choose printer' dialog that appears in the former case is the same as the one that appears at design time (see Print Setup) with the addition of a check box entitled "remember this printer in future". If the operator checks this box (and if Equinox successfully connects to the printer), the name of the report and the printer details are saved in the workstation .INI file. Client-server Equinox uses a section identified by the application, the workstation computer name and "Reports". The report name is the key that contains the printer details. If for some reason the operator chooses to remember a valid but incorrect printer, the offending line will have to be removed from the .INI. If the printer configuration is changed and Equinox is no longer able to connect to it, the line is removed automatically from the .ini file and the operator is prompted again. Single-user Equinox operates in a similar way, using a section containing the application name and "EquinoxReports". |
Category | Reports |
See Also | ForceBreak, NewPage, Print Setup, PrinterSettings, ReportField, ResetBlock |
Example | The following example could be attached to the At start of task event of a report, to display the Windows Print dialog when the report is run. ChoosePrinter To give users the ability to change any of the settings on the dialog, you could use this example: ChoosePrinter 1 To remove the users ability to even see the print dialog window you could use the following code. (if you remove a users choice of printer and settings, you must provide the defaults). ChoosePrinter 2,",0,0,0,0,0 |