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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement