Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Printer Bins
Message
De
03/05/2001 19:46:05
 
 
À
13/03/2001 14:50:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00484567
Message ID:
00503301
Vues:
16
I hope that by now you have resolved the problem you posted in March re:changing printer bins programatically.


It _is possible to do what you want.
If you still need a solution - you can do what you want by hacking the .frx


a rough example:

use myreport.frx in 0 alias rptalias
select rptalias
go top
locate for rptalias.objtype=1
replace tag with ""
replace tag2 with ""
myexpr=alltrim(expr)&& the content of the expr memo
mytray=atcline("DEFAULTSOURCE", myexpr) && the line containing "DEFAULTSOURCE"
myexprline=mline(myexpr,mytray)&& get the full content of the line
replace expr with strtran(myexpr,myexprline,"DEFAULTSOURCE="+MyDesiredTray
close the .frx

You can determine the value for the desired tray specific to your printer(s) by modifying the report, changing printer setup, saving the report, and then looking at the changed values in the .frx.

In the case of my HP8000DN
auto=0
manual=4
tray1=1
(manual and tray 1 are the same tray in this case)
tray2=2
tray3=11

Hack each report to set the defaultsource value to the desired bin.
Do this where it is most appropriate in your overall design.
Then, simply run the reports normally.


>My company has pre-printed back of reports that go to three different bins of our printer. Depending on which report
>is to be printed we want to programmatically change the printer bin so that the correct report with the proper back
>is produced to the correct bin without going to each report and changing the printer settings..
>
>I looked into the #INCLUDE "FoxPro.H" and played with the values in the .H file, PRTINFO(), PRT_DEFASOURCE
>and PRTBIN using the #DEFINE PRTBIN=3 in my main calling program but I am unable to change printer bins.
>I don't know if I am even close here.
>
>Is there a way to do this. Any help here would be greatly appreciated.
>
>Joe Ross
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform