Hi, FiveWinners.
I am printing to a Ticket printer through Class
PRINTER, however, only letter-size prints, even in the
define another printer paper size.
What we require is that the class does not take any size Printer
default to print the report actually prints a strip
the long and varied ticket's, imagine a kind report printing
tickets, you never know how many were sold and each line
Print is the information on this.
I do it with the Printer class, because printers are controlled
for Windows Vista Home Premium. (customer requirement)
The printer is an Epson TM-XXX typical, the effect of Class Printer
is the same, regardless of the model of the printer.
SAMPLING PART OF CODE PRINTING
IF BOLVEN > 1
PRINTER oPrnBol NAME "BOLETOS" TO "BOLTICK"
DEFINE FONT oFn1 NAME cFont SIZE 0,- 8 OF oPrnBol
DEFINE FONT oFn2 NAME cFont SIZE 0,- 8 BOLD OF oPrnBol
oPrnBol:lPrvModal:=.T.
oPrnBol:SetPortrait()
nRow:=1.0
CursorWait()
PAGE
oPrnBol:CmSay(nRow+=0.5, 3.7,cEmp,oFn2,,,,2)
oPrnBol:CmSay(nRow+=0.5, 3.7,cDom,oFn1,,,,2)
oPrnBol:CmSay(nRow+=0.5, 3.7,cRfc,oFn1,,,,2)
cTit:="VENTAS DEL "+cf(cFec)
oPrnBol:CmSay(nRow+=0.6,3.7,cTit,oFn1,,,,2)
oPrnBol:CmSay(nRow+=0.6,0.5,W_TITULO02,oFn1,,,,2)
nRow+=0.5
oPrnBol:CmLine(nRow,0.3,nRow,7.2)
oPrnBol:CmSay(nRow+=0.2,0.8,"No DOC" ,oFn1)
oPrnBol:CmSay(nRow ,3.0,"Bol" ,oFn1,,,,1)
oPrnBol:CmSay(nRow ,4.5,"PAGO" ,oFn1,,,,2)
oPrnBol:CmSay(nRow ,7.0,"IMPORTE",oFn1,,,,1)
nRow+=0.5
oPrnBol:CmLine(nRow,0.3,nRow,7.2)
nRec:=(oDBol)->(Recno())
(oDBol)->(DbGoTop())
DO WHILE !(oDBol)->(EoF())
oPrnBol:CmSay(nRow+=0.4,0.1,(oDBol)->NumDoc,oFn1)
oPrnBol:CmSay(nRow ,3.0,Tran((oDBol)->nPar,"9,999"),oFn1,,,,1)
oPrnBol:CmSay(nRow ,4.5,Bolserie(),oFn1,,,,2)
oPrnBol:CmSay(nRow ,7.0,Bolimporte,oFn1,,,,1)
(oDBol)->(DbSkip())
nREN++
ENDDO
nRow+=0.6
oPrnBol:CmLine(nRow,0.3,nRow,7.2)
(oDBol)->(DbGoTo(nRec))
oPrnBol:CmSay(nRow+=,4.4,"TOTAL DE BOLETOS:",oFn1,,,,1)
oPrnBol:CmSay(nRow ,5.8,Tran(BOLVEN,"9,999") ,oFn1,,,,1)
oPrnBol:CmSay(nRow+=,4.4,"CANCELADOS:" ,oFn1,,,,1)
oPrnBol:CmSay(nRow ,5.8,Tran(BOLCAN,"9,999") ,oFn1,,,,1)
oPrnBol:CmSay(nRow+=,0.8,"IMPORTES:",oFn1)
oPrnBol:CmSay(nRow+=,3.0,"REDONDEO ",oFn1)
oPrnBol:CmSay(nRow ,7.0,Tran(aBol[10],"9,999,999.99"),oFn1,,,,1)
oPrnBol:CmSay(nRow+=,3.0,"EFECTIVO $",oFn1)
oPrnBol:CmSay(nRow ,7.0,Tran(aBol[ 3],"9,999,999.99"),oFn1,,,,1)
oPrnBol:CmSay(nRow+=,3.0,"TARJETA",oFn1)
oPrnBol:CmSay(nRow ,7.0,Tran(aBol[ 4],"9,999,999.99"),oFn1,,,,1)
oPrnBol:CmSay(nRow+=,3.0,"CHEQUES",oFn1)
oPrnBol:CmSay(nRow ,7.0,Tran(aBol[ 5],"9,999,999.99"),oFn1,,,,1)
oPrnBol:CmSay(nRow+=,3.5,"CONTADO ->",oFn1)
oPrnBol:CmSay(nRow ,7.0,Tran(aBol[ 7],"9,999,999.99"),oFn1,,,,1)
oPrnBol:CmSay(nRow+=,3.5,"CREDITO ->",oFn1)
oPrnBol:CmSay(nRow ,7.0,Tran(aBol[ 8],"9,999,999.99"),oFn1,,,,1)
oPrnBol:CmSay(nRow+=,3.0,"Total Vendido $",oFn1)
oPrnBol:CmSay(nRow ,7.0,Tran(aBol[ 9],"9,999,999.99"),oFn1,,,,1)
nRow+=0.6
oPrnBol:CmLine(nRow,0.3,nRow,7.2)
ENDPAGE
oFn1:End(); oFn2:End()
ENDPRINT
ENDIF
Any Idea?
Thanks a Lot