Karen,

Among SO MANY enhancements, features and new commands, the 
upcoming upgrade version of TGRB2000 (ver 6.5++) for Windows, 
build: 1,840JxRT03, currently under final beta, includes the 
(CVAL('CurrentPrinter')). 

Quick Example: Using TGRB2000 (ver 6.5++) and higher

-- Get the Windows Default Printer

SET VAR vQuote = (CVAL('QUOTE'))
SET VAR vWinDefaultPrinter = (CVAL('CurrentPrinter'))
SET VAR vWinDefaultPrinter = (.vQuote+.vWinDefaultPrinter+.vQuote)

-- Get List of All Windows Installed Printers 
SET VAR vPrinterList = (CVAL('Printers')) 

-- Give user the option to select printer from the list 
CLS
CHOOSE vTempPrinter FROM #LIST .vPrinterList AT CENTER CENTER +
CHKBOX 1 TITLE 'Select Printer' +
CAPTION 'Currently Available Printers' +
LINES .vLines FORMATTED
IF vTempPrinter = NULL OR vTempPrinter = '[Esc]' THEN
   PAUSE 2 USING 'No Printer Selected!'
   GOTO Done
ENDIF
SET VAR vTempPrinter = (.vQuote+.vTempPrinter+.vQuote)

-- Change Printer Accordingly
PRNSETUP &vTempPrinter 

-- Send Output to the Selected Printer
OUTP PRINTER
PRINT ReportName WHERE ... ORDER BY ... 
OUTP SCREEN

-- Switch back to the Windows Default Printer 
PRNSETUP &vWinDefaultPrinter

LABEL Done
CLEAR ALL VAR or whatever ...
QUIT TO MainMenu.RMD or whatever ...

For more details/examples (heads-up), see my post: 

>From The Edge: Automating Printer Selections

Currently, all details are provided to our lovely and 
dedicated beta testers in RBW65PP.TXT. 

Stay tuned ...

Very Best Regards,

Razzak.


At 10:18 AM 5/9/2001 -0400, Karen Tellef wrote:

>In RBWin 6.5+, I have hardcoded a 'PRNSETUP <printername>' 
>command in programs that always send data to a certain
>printer that is always loaded with forms.  The problem is
>that after it is done, I would like to 'PRNSETUP' it back
>to the workstation's DEFAULT printer.  The default could
>be a network printer or its local printer.  I can't store
>the default in a table because that would be by USER, not
>by WORKSTATION, which is what I need.  Anyway I can 
>determine what the workstation's default printer is? I 
>was hoping for a 'PRNSETUP 'default''...


===================================-============================
R:BASE Developers's Conference: http://www.rbase.com/conference 
Official R:BASE List Server:    mailto:[EMAIL PROTECTED]
RBTI Events/Training:        http://www.rbase2000.com/events
R:DCC Members:               http://www.rbase2000.com/rdcc
================================================================
R:BASE, Oterro & R:Tango are registered trademarks of RBTI.
==================================-=============================

Reply via email to