At 01:25 PM 6/9/2008, Bill Niehaus wrote:
I'm trying to change the printer when I'm not in a report or label.
I am trying to change the output location for an upcoming select
command that sends info to a printer.
I believe I recall a command to view printers setup for a computer
and to select one, but the command or procedure escapes me now.
Bill,
Here you go ...
Example 01:
-- Start here ...
-- PickPrinterAndPrintReport.RMD
IF (CVAL('DATABASE')) <> 'RRBYW14' OR (CVAL('DATABASE')) IS NULL THEN
CONNECT RRBYW14 IDENTIFIED BY NONE
ENDIF
CLEAR VAR vAvailablePrinters,vItemCount,vDefaultPrinter,vSelectedPrinter
SET VAR vAvailablePrinters TEXT = NULL
SET VAR vItemCount INTEGER = NULL
SET VAR vDefaultPrinter TEXT = NULL
SET VAR vAvailablePrinters = ((CVAL('Printers'))+',Screen')
SET VAR vItemCount = (ITEMCNT(.vAvailablePrinters))
SET VAR vDefaultPrinter = (CVAL('WindowsPrinter'))
SET VAR vSelectedPrinter TEXT = NULL
CLS
CHOOSE vSelectedPrinter FROM #LIST .vAvailablePrinters +
CHKBOX 1 TITLE 'Select Appropriate Printer' +
CAPTION 'Available Printers' LINES .vItemCount FORMATTED +
OPTION LIST_FONT_COLOR MAROON +
|LIST_BACK_COLOR [R234,G234,B234] +
|TITLE_FONT_COLOR MAROON +
|TITLE_BACK_COLOR [R234,G234,B234] +
|WINDOW_BACK_COLOR [R234,G234,B234] +
|TITLE_FONT_NAME VERDANA +
|TITLE_FONT_SIZE 9 +
|TITLE_BOLD ON +
|WINDOW_CAPTION +
|BUTTONS_BACK_COLOR WHITE +
|BUTTONS_SHOW_GLYPH ON +
|THEMENAME R:BASE Rocks!
IF vSelectedPrinter IS NULL OR vSelectedPrinter = '[Esc]' THEN
GOTO Done
ENDIF
IF vSelectedPrinter = 'Screen' THEN
PRINT CustYellowPages +
OPTION SCREEN|WINDOW_STATE MAXIMIZED +
|ZOOM_TYPE PERCENTAGE|ZOOMPERCENT 90
GOTO Done
ELSE
PRNSETUP .vSelectedPrinter
PRINT CustYellowPages OPTION PRINTER
PRNSETUP .vDefaultPrinter
ENDIF
LABEL Done
CLS
CLEAR VAR vAvailablePrinters,vItemCount,vDefaultPrinter, +
vSelectedPrinter
RETURN
-- End here ....
Have fun!
Very Best R:egards,
Razzak.
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================