Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing to specific printer tray
Message
 
À
10/11/2004 09:24:12
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00959962
Message ID:
00960168
Vues:
11
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform