Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tray selection
Message
De
14/10/2004 14:59:13
 
 
À
14/10/2004 14:20:01
Marcel Roy
South West Direct
Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00951062
Message ID:
00951513
Vues:
17
Not to my knowledge. You can control which papertray a report prints to by changing the defaultsource= line in the .frx record that has an objecttype of 53 (usually the first record). However, that setting sets the papertray for the ENTIRE report, I do not believe it can be changed for each page of the report in any way. If you need to do that, then it would be better to create separate reports for each page of the report so each report can be sent to a specific papertray. The other option is to send the report to a text file, then read the file line by line, determine pages, send each page to the printer separately (based on which tray it gets printed to) and select a specific tray (by selecting a different printer as was recommended to you earlier by Tore in another message) then and continue on that way...

>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
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform