Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tray selection
Message
De
14/10/2004 14:20:01
Marcel Roy
South West Direct
Floride, États-Unis
 
 
À
14/10/2004 13:14:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00951062
Message ID:
00951492
Vues:
14
Hi Tracy realy nice code thank you

But can I create a function exp: mytrayselection(_Pageno) and put that function the in the report Expression.
***If the _Pageno = 1 print from DEFAULTSOURCE=257 or the _Pageno = 2 print from DEFAULTSOURCE=258 ****
That way the report will change tray depending of page number or I can call a tray number in a field.

put that function in a procedure mytray.prg
FUNCTION mytrayselection
PARAMETERS pPage
oldArea = SELECT()
IF USED("prn")=.F.
   USE c:\commercial\prt1p.frx IN 0 ALIAS prn SHARED
ENDIF

SELECT prn
go top

IF MOD(pPage, 2)=1
   APPEND MEMO Expr FROM c:\commercial\Tray1.txt OVERWRITE
   prn = 1
ELSE
   APPEND MEMO Expr FROM c:\commercial\Tray2.txt OVERWRITE
   prn = 2 
ENDIF
SELECT(oldArea)
RETURN prn
set procedure to mytray.prg
Where my Tray1.txt:
DRIVER=winspool
DEVICE=2 Echo
OUTPUT=IP_192.168.0.251
ORIENTATION=0
PAPERSIZE=1
SCALE=100
ASCII=100
COPIES=1
DEFAULTSOURCE=257
PRINTQUALITY=600
COLOR=1
DUPLEX=2
YRESOLUTION=600
TTOPTION=3
COLLATE=1

Where my Tray2.txt:
DRIVER=winspool
DEVICE=2 Echo
OUTPUT=IP_192.168.0.251
ORIENTATION=0
PAPERSIZE=1
SCALE=100
ASCII=100
COPIES=1
DEFAULTSOURCE=258
PRINTQUALITY=600
COLOR=1
DUPLEX=2
YRESOLUTION=600
TTOPTION=3
COLLATE=1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform