depois da atualizacao para fivewin 1204 o preview mostra assim:
se compilo com aversao anteiro mostra correto
que tenho q fazer?
#include "FiveWin.ch"
#define DMPAPER_A4 9 // A4 210 x 297 mm
Function RPed06()
Local oPrn, oFont1, oFont2, oFont3, oFont4, oPen4, nRecno := Pedm->(Recno()),;
nRowStep, nColStep, prow, pcol, cText, cLine, nFor, nLines,;
Start := .t., TotalBru:=0, TotalLiq:=0, TotalDes:=0, TotalIpi:=0,;
TotBru:=0, TotLiq:=0, TotDes:=0, TotIpi:=0, nQtd_Pedi:=0, nIten:=0, nPag:= 1
PRINT oPrn NAME "ESPELHO PEDIDO VENDA" PREVIEW
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-08 OF oPrn
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-08 BOLD OF oPrn
DEFINE FONT oFont3 NAME "ARIAL" SIZE 0,-07 OF oPrn
DEFINE FONT oFont4 NAME "ARIAL" SIZE 0,-09 BOLD OF oPrn
DEFINE PEN oPen4 WIDTH 3 COLOR 000000 //3123123
oPrn:SetPage(DMPAPER_A4)
nRowStep = oPrn:nVertRes() / 60 // We want 60 rows
nColStep = oPrn:nHorzRes() / 78 // We want 78 cols
prow:=nRowStep
pcol:=nColStep
DbSelectArea("Pedi")
dbSetRelation( "Prod", {|| Pedi->Fam_Pedi+Pedi->Pro_Pedi} )
PAGE
CAJAROUND_(0.5, 0.5, 20.5, 2.7, 150, 150, oPrn, oPen4)
CAJAROUND_(0.5, 2.7, 20.5, 4.7, 150, 150, oPrn, oPen4)
// CAJAROUND_(0.5, 4.7, 20.5, 5.5, 150, 150, oPrn, oPen4)
CAJAROUND_(0.5, 24.7, 20.5, 28.5, 150, 150, oPrn, oPen4)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "ESPELHO PEDIDO DE VENDA"+Iif(Empr->Nem_Empr, " - "+Empr->Nom_Empr, ""), oFont4)
oPrn:Say( prow, pcol*57, "EM: "+dtoc(date())+' - '+time()+" PAG: "+Alltrim(Str(nPag)), oFont2)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "PEDIDO: "+Alltrim(Pedm->Cod_Pedm)+"-"+Pedm->Ser_Pedm+" SIT: "+Pedm->Sta_Pedm+" "+" EMISSÃO: "+DtoC(Pedm->Dat_Pedm), oFont2)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "FORMA PAGM.: "+Cond->Cod_Cond+"-"+Alltrim(Cond->Nom_Cond)+" REPR.: "+Vend->Cod_Vend+"-"+Alltrim(Vend->APe_Vend)+" TRANSP.: "+Tran->Cod_Tran+"-"+Tran->Nom_Tran, oFont2)
prow+=nRowStep
prow+=nRowStep
oPrn:Say( prow, PCol*003, "CLIENTE: "+Clie->Cod_Clie+" - "+Clie->Nom_Clie, oFont1)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "END.: "+Alltrim(Clie->End_clie)+" "+Alltrim(Clie->Nmr_clie)+" "+Alltrim(Clie->Cmp_clie)+" "+Clie->Bai_Clie+"MUNICIPIO: "+Alltrim(Clie->Cid_Clie)+" - UF: "+Clie->Est_Clie+" C.E.P.: "+Clie->Cep_Clie, oFont1)
prow+=nRowStep
oPrn:Say( prow, PCol*003, Iif(Clie->Pfj_Clie, "CPF: ","CNPJ: ")+Iif(Clie->Pfj_Clie, Clie->Cpf_Clie, Clie->Cgc_Clie)+Space(08)+Iif(Clie->Pfj_Clie, "RG: ", "INS.EST.: ")+Iif(Clie->Pfj_Clie, Clie->Ide_Clie, Clie->Ins_Clie), oFont1)
prow+=nRowStep
prow+=nRowStep
oPrn:Say( prow, PCol*003, "ITEN GR-CÓD. DESCRIÇÃO PRODUTO", oFont1)
oPrn:Say( prow, PCol*043, "MD", oFont1)
oPrn:Say( prow, PCol*047, "QTD.", oFont1)
oPrn:Say( prow, PCol*052, "PREÇO", oFont1)
oPrn:Say( prow, PCol*057, "DESC.", oFont1)
oPrn:Say( prow, PCol*063, "IPI", oFont1)
oPrn:Say( prow, PCol*069, "TOTAL", oFont1)
prow+=nRowStep
prow+=nRowStep
Pedi->(DbSeek(Pedm->Cod_Pedm))
While !Pedi->(Eof()) .and. Pedi->Cod_Pedi = Pedm->Cod_Pedm
TotBru = (Pedi->Qtd_Pedi*Pedi->Prc_Pedi)
TotDes = (pedi->qtd_Pedi*Pedi->Prc_Pedi*pedi->Des_Pedi/100)
TotIpi = (Pedi->Qtd_Pedi*Pedi->Prc_Pedi*Pedi->Ipi_Pedi/100)-((Pedi->Qtd_Pedi*Pedi->Prc_Pedi*Pedi->Ipi_Pedi/100)*Pedi->Des_Pedi/100)
TotLiq = TotBru - Totdes + TotIpi
nIten=nIten+1
oPrn:Say(prow, PCol*004, StrZero(nIten,2,0), oFont1)
oPrn:Say(prow, PCol*006, Prod->Fam_Prod+"-"+Prod->Cod_Prod+" "+Prod->Nom_Prod, oFont3)
oPrn:Say(prow, PCol*043, Prod->Uni_Prod, oFont1)
oPrn:Say(prow, PCol*049, Tran(Pedi->Qtd_Pedi,"9999999"), oFont1,,,, 1)
oPrn:Say(prow, PCol*055, Tran(Pedi->Prc_Pedi,"@E 999,999.99"), oFont1,,,, 1)
oPrn:Say(prow, PCol*060, Tran(TotDes,"@E 999,999.99"), oFont1,,,, 1)
oPrn:Say(prow, PCol*065, Tran(TotIpi,"@E 999,999.99"), oFont1,,,, 1)
oPrn:Say(prow, PCol*072, Tran(TotLiq,"@E 999,999.99"), oFont1,,,, 1)
TotalBru = TotalBru + (Pedi->Qtd_Pedi*Pedi->Prc_Pedi)
TotalDes = TotalDes + (pedi->qtd_Pedi*Pedi->Prc_Pedi*pedi->Des_Pedi/100)
TotalIpi = TotalIpi + (Pedi->Qtd_Pedi*Pedi->Prc_Pedi*Pedi->Ipi_Pedi/100)-((Pedi->Qtd_Pedi*Pedi->Prc_Pedi*Pedi->Ipi_Pedi/100)*Pedi->Des_Pedi/100)
nQtd_Pedi=nQtd_Pedi+Pedi->Qtd_Pedi
If !Empty(Pedi->Obm_Pedi)
cText := Pedi->Obm_Pedi
nLines := MlCount(Alltrim(cText), 70)
FOR nFor := 1 TO nLines
cLine := MemoLine(Alltrim(cText), 70, nFor)
prow+=nRowStep
oPrn:Say(prow, PCol*006, cLine, oFont3)
NEXT
Endif
prow+=nRowStep
Pedi->(dbskip())
If prow>nRowStep*47
prow := 1
nPag++
oPrn:EndPage()
oPrn:StartPage()
CAJAROUND_(0.5, 0.3, 20.5, 1.4, 150, 150, oPrn, oPen4)
CAJAROUND_(0.5, 1.4, 20.5, 1.9, 150, 150, oPrn, oPen4)
CAJAROUND_(0.5, 24.7, 20.5, 28.5, 150, 150, oPrn, oPen4)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "ESPELHO PEDIDO DE VENDA - "+Alltrim(Empr->Nom_Empr), oFont4)
oPrn:Say( prow, pcol*057, "EM: "+dtoc(date())+' - '+time()+" PAG: "+Alltrim(Str(nPag)), oFont2)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "PEDIDO: "+Alltrim(Pedm->Cod_Pedm)+"-"+Pedm->Ser_Pedm+" SIT: "+Pedm->Sta_Pedm+" "+" EMISSÃO: "+DtoC(Pedm->Dat_Pedm), oFont2)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "ITEN GR-CÓD. DESCRIÇÃO PRODUTO", oFont1)
oPrn:Say( prow, PCol*043, "MD", oFont1)
oPrn:Say( prow, PCol*047, "QTD.", oFont1)
oPrn:Say( prow, PCol*052, "PREÇO", oFont1)
oPrn:Say( prow, PCol*057, "DESC.", oFont1)
oPrn:Say( prow, PCol*063, "IPI", oFont1)
oPrn:Say( prow, PCol*069, "TOTAL", oFont1)
prow+=nRowStep
prow+=nRowStep
Endif
End
TotalLiq = TotalBru - Totaldes + TotalIpi
// oPrn:Say( (nRowStep*48)-nIten, Pcol*3, Repl('_', 124), oFont1)
oPrn:Say( (nRowStep*49)-nIten, Pcol*003, "TOTAL DO PEDIDO", oFont1)
oPrn:Say( (nRowStep*49)-nIten, Pcol*049, Tran(nQtd_Pedi, "9999999"), oFont1,,,, 1)
oPrn:Say( (nRowStep*49)-nIten, Pcol*060, Tran(TotalDes, "@E 999,999.99"), oFont1,,,, 1)
oPrn:Say( (nRowStep*49)-nIten, Pcol*065, Tran(TotalIpi, "@E 999,999.99"), oFont1,,,, 1)
oPrn:Say( (nRowStep*49)-nIten, Pcol*072, Tran(TotalLiq, "@E 999,999.99"), oFont1,,,, 1)
cText := Pedm->Obs_Pedm
nLines := MlCount(Alltrim(cText),115)
FOR nFor := 1 TO nLines
cLine := MemoLine(Alltrim(cText), 115, nFor)
oPrn:Say((nRowStep*(50+nFor))-nIten, PCol*003, cLine, oFont3)
NEXT
oPrn:EndPage()
ENDPRINT
oFont1:End()
oFont2:End()
oFont3:End()
oFont4:End()
dbClearRelation()
DbSelectArea("Pedm")
Return nil
#include "FiveWin.ch"
Function RPed06()
Local oPrn, oFont1, oFont2, oFont3, oFont4, oPen4, nRecno := Pedm->(Recno()),;
nRowStep, nColStep, prow, pcol, cText, cLine, nFor, nLines,;
Start := .t., TotalBru:=0, TotalLiq:=0, TotalDes:=0, TotalIpi:=0,;
TotBru:=0, TotLiq:=0, TotDes:=0, TotIpi:=0, nQtd_Pedi:=0, nIten:=0, nPag:= 1
PRINT oPrn NAME "ESPELHO PEDIDO VENDA" PREVIEW
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-08 OF oPrn
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-08 BOLD OF oPrn
DEFINE FONT oFont3 NAME "ARIAL" SIZE 0,-07 OF oPrn
DEFINE FONT oFont4 NAME "ARIAL" SIZE 0,-09 BOLD OF oPrn
nRowStep = oPrn:nVertRes() / 60 // We want 60 rows
nColStep = oPrn:nHorzRes() / 78 // We want 78 cols
prow:=nRowStep
pcol:=nColStep
PAGE
prow+=nRowStep
oPrn:Say( prow, pcol*003, "ESPELHO PEDIDO DE VENDA", oFont4)
oPrn:Say( prow, pcol*057, "EM: TESTE ETSTE TESTE", oFont2)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "PEDIDO TESTEEEEEEEEEEEEEEEEEE", oFont2)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "FORMA PAGM.: TESTE TESTE", oFont2)
prow+=nRowStep
prow+=nRowStep
oPrn:Say( prow, PCol*003, "CLIENTE: TETSTE ETSTE ETSTE TESTE", oFont1)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "END.: TESTE ETSTE ETSTE ETSTE ", oFont1)
prow+=nRowStep
oPrn:Say( prow, PCol*003, "testeg fgf g sdf gdfgdsfgfdsgdsfgdsfgdsfgdf ", oFont1)
oPrn:EndPage()
ENDPRINT
Return nil
before
if ! ::lZoom .and. ! lInit
::Zoom( .T. ) // A.L. 08 Oct 2007
endif
after
if ! ::lZoom .and. ! lInit
// ::Zoom( .T. ) // A.L. 08 Oct 2007 <= essa linha foi comentada
endif
Return to All products support
Users browsing this forum: No registered users and 6 guests