CORRECTED ....
Tuesday, February 10, 2015
Tip of the Day:
Selecting Local and/or Available Network Printer for R:BASE Session
Product: R:BASE eXtreme 9.5 (32/64)
Build..: 9.5.5.20109 or higher
www.rupdates.com
www.rbaseupdates.com (Mirror Site)
Section.: PRNSETUP
Keywords: CHOOSE, CVAL, FUNCTIONS
When printer names change and/or new printer(s) are installed locally
or Universal Naming Convention (UNC) redirection is enabled, here's
a code that you can use to select the appropriate printer for current
R:BASE session regardless of the long printer name, printer name with
spaces, or printer with UNC path.
-- Start here
-- Selecting Local and/or Available Network Printer for R:BASE Session ...
-- Author: A. Razzak Memon
-- Date Created: February 10, 2015
-- Last Updated:
CLEAR VAR vAvailablePrinters,vItemCount,vSelectedPrinter
SET VAR vAvailablePrinters NOTE = NULL
SET VAR vItemCount INTEGER = NULL
SET VAR vAvailablePrinters = (CVAL('Printers'))
SET VAR vItemCount = (ITEMCNT(.vAvailablePrinters))
SET VAR vSelectedPrinter TEXT = NULL
CLS
CHOOSE vSelectedPrinter FROM #LIST .vAvailablePrinters CHKBOX 1 +
TITLE 'Select Appropriate Printer and Click on [OK] Button to Continue' +
CAPTION 'Available Printers' +
LINES .vItemCount FORMATTED +
OPTION WINDOW_BACK_COLOR WHITE +
|TITLE_BACK_COLOR WHITE +
|TITLE_FONT_NAME Tahoma +
|TITLE_FONT_COLOR NAVY +
|TITLE_FONT_SIZE 14 +
|LIST_BACK_COLOR WHITE +
|LIST_FONT_NAME Tahoma +
|LIST_FONT_COLOR NAVY +
|LIST_FONT_SIZE 12 +
|BUTTONS_SHOW_Glyph ON +
|BUTTONS_BACK_COLOR WHITE
IF vSelectedPrinter IS NULL OR vSelectedPrinter = '[Esc]' THEN
GOTO Done
ENDIF
PRNSETUP .vSelectedPrinter
LABEL Done
CLEAR VAR vAvailablePrinters,vItemCount,vSelectedPrinter
RETURN
-- End here
For a complete list of PRNSETUP OPTIONs, refer to HELP PRNSETUP.
Very Best R:egrds,
Razzak.
www.rbase.com
www.facebook.com/rbase
--
32 years of continuous innovation!
17 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--