PreviousNextIndex

SYSTEM-DIALOG PRINTER-SETUP statement


(Windows only)

Displays the Windows Print dialog box and lets the user set the default print context for subsequent print jobs in Windows.

Note: Does not apply to SpeedScript programming.
Syntax

SYSTEM-DIALOG PRINTER-SETUP 
  [ NUM-COPIES expression ] 
  [ LANDSCAPE | PORTRAIT ] 
  [ UPDATE status ] 
  [ IN WINDOW window ] 

NUM-COPIES expression
LANDSCAPE
PORTRAIT
UPDATE status
IN WINDOW window
Example

This example presents a dialog box that allows you to set up and print information from the sports database. When you choose the Printer Setup button, it displays the Windows Print dialog box. Using the latest settings, you can then print a list of customer names from the sports database in alphabetical order by choosing the Print Customer Names button.

r-prtdlg.p
DEFINE BUTTON bprintset   LABEL "Printer Setup". 
DEFINE BUTTON bprintnames LABEL "Print Customer Names". 
DEFINE BUTTON bcancel     LABEL "Cancel". 
DEFINE FRAME PrintFrame  
  bprintset bprintnames bcancel 
  WITH TITLE "Quick Printer" VIEW-AS DIALOG-BOX. 
ON CHOOSE OF bprintset DO: 
  SYSTEM-DIALOG PRINTER-SETUP. 
END. 
ON CHOOSE OF bprintnames DO: 
  OUTPUT TO PRINTER. 
  FOR EACH Customer NO-LOCK BY Customer.Name: 
    DISPLAY Customer.Name WITH STREAM-IO. 
  END. 
  OUTPUT CLOSE. 
END. 
ENABLE ALL WITH FRAME PrintFrame. 
WAIT-FOR CHOOSE OF bcancel IN FRAME PrintFrame. 

Notes
See also

OUTPUT TO statement, SESSION system handle


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex