dbedit mais rápido
Enviado: 29 Dez 2009 09:06
Bom Dia Amigos do Forum.
Eu faço um filtro com o dbedit e o código é o seguinte
Como altero o programa para que o scope faça o browse mais rápido com muitos registos.
Obrigado a todos
Lapinhazzz
Eu faço um filtro com o dbedit e o código é o seguinte
Código: Selecionar todos
function mv_n
public cvara,varia,sai,novo,rplafc,rplafc,rdata,rprecov,quanto,vcodigo,corc,corp,rcodigo,RTOTALP,RTOTALC,RQUANTP,RQUANTC
priv l,vapaga,x,resto,tplafond
priv vprod,vprecov,vitem,vvenda,rvtotal,vquant
saida=.f.
RQUANTC=0
RQUANTP=0
RTOTALP=0
RTOTALC=0
tit("Vendas em Serie")
rot="INCLUI_ITEM"
*sai=0
wait "ola"
cor(3)
rvtotal=0
tplafond=0
@04,00 say "Venda DataACTUAL Proc Utente Esc Curso Ano Turma Total"
cor(5)
sele 1
go bott
@05,00 say strzero(a1->venda+1,5,0)
cor(2)
cor(51)
@05,07 say date()
datactual=date()
cor(2)
do whil .T.
IF lastkey()=27
exit
ENDIF
sele 5
use pessoal
inde on proc to pessoal1
rproc=" "
@05,19 get rproc valid dproc()
read
if lastkey()=27
exit
endi
rplafp=plafp
rplafc=plafc
@05,19 SAY PROC
@05,26 say utente
@05,58 say ano
@05,64 say turma
rcodigocur=codigocur
rescalao=cescalao
sele 6
use escaloes
inde on cescalao to escalao1
seek rescalao
IF found() .AND. cescalao=" "
save scree to ola
men(2,4,0,907,0,0,0,0)
restore scree from ola
else
letrat=letraesc
cor(2)
@05,47 say letraesc
endif
sele 7
use cursos
inde on codigocur to ccur
seek rcodigocur
IF found() .AND. rcodigocur=" "
save scree to ola
men(2,4,0,908,0,0,0,0)
restore scree from ola
else
rcoridocur=codigocur
rcurso=cursoabv
endif
@05,51 say cursoabv
l=lastkey()
IF l=27
SELE 1
ROT="MV"
RETURN
ENDIF
cor(2)
var()
sele 2
set orde to 1
* CRIA ARQ TEMP***************************
copy stru to temp
sele 21
use temp alia b21
appe blan
set filt to recno()>1
* inde on descend(item) to temp1
inde on item to temp1
inde on item to temp2
inde on val(codigoprod) to iquant
set inde to temp1,temp2,iquant
set orde to 2
sele 2
seek strzero(a1->venda,5,0)
*FIM*******************************************
sele 3
use produtos
inde on prod to iprod
inde on val(codigoprod) to icodigo
rcor=" "
copias=0
flag=.f.
rcodigo=" "
do whil .t.
vcodigo=" "
vquant=0
sele 21
publ v1c[1],v2c[1],v3c[1],v4c
v1c[1]="strzero(item,3,0)+' '+codigoprod+' '+prod+' '+str(quant)+' '+cor+' '+tran(precov,'@E 9,999.99')+' '+tran(quant*precov,'@E 999,999.99')"
v3c[1]="Item Codigo Produto Quant COR Pvenda Total"
v2c[1]="@"
v4c=""
pfs("[F5ExcluiLinha,F10Grava")
cor(2)
keyb chr(26)
set delete on
KEYB CHR(26)
cor(13)
@ 21,10 say spac(30)
@ 21,62 say spac(6)
@ 21,70 say spac(8)
@ 21,00 say spac(47)
@ 21,72 say spac(8)
cor(2)
dbedit(07,00,19,79,v1c,"fc",v2c,v3c,v4c)
l=lastkey()
IF l=27
exit
endif
Obrigado a todos
Lapinhazzz