Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tray selection
Message
From
14/10/2004 14:20:01
 
 
To
14/10/2004 13:14:03
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00951062
Message ID:
00951492
Views:
13
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform