Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing to specific printer tray
Message
 
To
10/11/2004 09:24:12
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00959962
Message ID:
00960168
Views:
10
Another option might be the following
DO CHANGETRAY WITH "C:\myreport.FRX", 1 && OR WHATEVER TRAY YOU WANT

FUNCTION CHANGETRAY
LPARAMETER lcFRX, lnTray
LOCAL lcNewExpr, lnStartCopiesLine, lcStartAtCopiesLine, lnEndCopiesLine ;
    lnLenCopiesLine, lcTop, lcBottom
#DEFINE vfCRLF CHR(13) + CHR(10)

IF !(UPPER(RIGHT(lcFRX, 4)) = ".FRX")
    lcFRX = lcFRX + ".FRX"
ENDIF
USE (lcFRX)
LOCATE FOR objType = 1 AND objCode = 53

IF EMPTY(EXPR)

    lcNewExpr = "DEFAULTSOURCE=" + ALLT(STR(lnTray)) + vfCRLF
ELSE

    lnStartCopiesLine = ATC("DEFAULTSOURCE", EXPR)
    lcStartAtCopiesLine = SUBSTR(EXPR, lnStartCopiesLine)
    lnEndCopiesLine = ATC(vfCRLF, lcStartAtCopiesLine)
    lnLenCopiesLine = LEN(SUBSTR(lcStartAtCopiesLine, 1, lnEndCopiesLine))
    lcTop = SUBSTR(EXPR, 1, lnStartCopiesLine - 1)
    lcBottom = SUBSTR(EXPR, (LEN(lcTop) + lnLenCopiesLine))
    lcNewExpr  = lcTop + "DEFAULTSOURCE=" + ALLT(STR(lnTray)) + lcBottom

ENDIF

REPLACE EXPR WITH lcNewExpr
USE IN (lcFRX)
ENDFUNC
>Is there a way that I can specify which printer tray I wish to print to ?
>
>Thanks
>Stephen J. Hunt
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform