FoxPro/Visual FoxPro - AYUDA CON TOTAL ON

 
Vista:

AYUDA CON TOTAL ON

Publicado por ANDRES F (10 intervenciones) el 12/05/2007 18:15:09
HOLA COMUNIDAD

TENGO UNA TABLA MOVIMIENTO CON TIPO= FV(FACTURAS),CO(COMPRAS),EG (EGRESOS), CONSECUTIVO,ITEM
BUENO EN EL ENCABEZADO TENGO COSTOTOTAL,VALORTOTAL,TIPO,CONSECUTIVO Y LO QUE HACE ES SUMAR POR TIPO Y CONSECUTIVO Y HACE EL REMPLAZO EN LA TABLA ENCABEZADO POR EL RESULTADO DE LA SUMATORIA EN EL CONSECUTIVO + TIPÒ RESPECTIVO

PUES LO MAS RARO ES QUE EN LA TABLA TT HACE LA SUMATORIA BIEN Y LLEVA LOS CAMPOS QUE SON PERO EN EL MOMENTO DE HACER EL REPLACE NADA MAS ME ESTA COGIENDO LOS FV Y LOS OTROS NO LOS ESTA LLEVANDO LA VERDAD NO TENGO IDEA QUE ES LO QUE ESTA PASANDO CUALQUIER AYUDA ESTARE MUY AGRADECIDO

SET SAFE OFF
DROP TABLE TT
selec MOVIMIENTO
index on tipo+alltrim(str(conse)) to TT
total on tipo+alltrim(str(conse)) FIEL VALORit,costoit to TT
use tt
SELECT ECABEZADO
SET RELATION to TIPO+(STR(CONSE)) into tt
REPLACE all VALORTOTAL WITH tt.VALORIT FOR CONSE=tt.CONSE AND TIPO=tt.TIPO
REPLACE all COSTOTOTAL WITH tt.COSTOit FOR CONSE=tt.CONSE AND TIPO=tt.TIPO
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

RE:AYUDA CON TOTAL ON

Publicado por Ernesto Hernandez (4623 intervenciones) el 12/05/2007 19:32:01
DROP TABLE TT Por que estas eliminando la tabla ??

podrias mandar el resultado a un cursor no seria mejor para poder manejarlo como tu desees .


Suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA CON TOTAL ON

Publicado por Plinio (7841 intervenciones) el 13/05/2007 00:36:54
YO cambiaria al comando CALCULATE que me permite hacer varios calculos a la vez.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar