FoxPro/Visual FoxPro - Reporte

 
Vista:

Reporte

Publicado por MAURO (14 intervenciones) el 31/03/2008 18:12:07
Tengo una Tabla la cual contiene una serie de campos ejemplo.

Ticket
Fecha
Placa
Cliente
Producto
Peso 1
Peso 2
Neto

Lo que deseo hacer con esa tabla es emitir un reporte que cuando yo desee liatar por cliente y fecha me tome solo esos datos el formulario que hice me emite el reporte pero el problema es que no selecciona lo que deseo es decir si hay 20 clientes me lista los 20 cuando yo deso especificamente uno. este es el formulario que tengo si me podrian ayudar,
******
select tickets_rep
do case
case thisform.optiongroup1.option1.value=1
titu_repo = 'lista de tickets del dia'
report form inf_ticke01 to printer prompt for tickets_rep.fecha1>=thisform.container2.text1.value .and. tickets_rep.fecha2<=thisform.container2.text2.value preview in screen
case thisform.optiongroup1.option2.value=1
titu_repo = 'lista de tickets por producto'
report form inf_ticke01 to printer prompt for tickets_rep.fecha1>=thisform.container2.text1.value .and. tickets_rep.fecha2<=thisform.container2.text2.value .and. alltrim(tickets_rep.desc_prod)=alltrim(thisform.container2.combo1.displayvalue) preview in screen
case thisform.optiongroup1.option3.value=1
titu_repo = 'lista de tickets por clientes'
if empty(thisform.container2.combo2.displayvalue)
report form inf_ticke01 to printer prompt for tickets_rep.fecha1>=thisform.container2.text1.value .and. tickets_rep.fecha2<=thisform.container2.text2.value .and. alltrim(tickets_rep.desc_cp)=alltrim(thisform.container2.combo2.displayvalue) preview in screen
else
report form inf_ticke01 to printer prompt for tickets_rep.fecha1>=thisform.container2.text1.value .and. tickets_rep.fecha2<=thisform.container2.text2.value .and. tickets_rep.tipo='cliente' preview in screen
endif
case thisform.optiongroup1.option4.value=1
titu_repo = 'lista de tickets por proveedores'
if empty(thisform.container2.combo2.displayvalue)
report form inf_ticke01 to printer prompt for tickets_rep.fecha1>=thisform.container2.text1.value .and. tickets_rep.fecha2<=thisform.container2.text2.value .and. alltrim(tickets_rep.desc_cp)=alltrim(thisform.container2.combo2.displayvalue) preview in screen
else
report form inf_ticke01 to printer prompt for tickets_rep.fecha1>=thisform.container2.text1.value .and. tickets_rep.fecha2<=thisform.container2.text2.value .and. tickets_rep.tipo='proveedor' preview in screen
endif
case thisform.optiongroup1.option5.value=1
titu_repo = 'lista de tickets por transporte'
report form inf_ticke01 to printer prompt for tickets_rep.fecha1>=thisform.container2.text1.value .and. tickets_rep.fecha2<=thisform.container2.text2.value .and. tickets_rep.transporte=alltrim(thisform.container2.text3.value) preview in screen
case thisform.optiongroup1.option6.value=1
titu_repo = 'lista de tickets por vehiculo'
report form inf_ticke01 to printer prompt for tickets_rep.fecha1>=thisform.container2.text1.value .and. tickets_rep.fecha2<=thisform.container2.text2.value .and. tickets_rep.placa=thisform.container2.text4.value preview in screen
case thisform.optiongroup1.option7.value=1
titu_repo = 'lista de tickets en transito'
report form inf_ticke01 to printer prompt for (tickets_rep.peso2=0 .or. empty(tickets_rep.peso2)) .and. tickets_rep.estado<>'a' preview in screen
endcase
thisform.desactivar

***********************
gracias por la ayuda
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

RE:Reporte

Publicado por jorge (423 intervenciones) el 31/03/2008 19:10:19
hola
te recomiendo que utilices un cursor con los datos ya a imprimir, este lo haces haciendo una consulta (SELECT-SQL) a las tablas de las que extraeras la informacion ej;

SELECT * FROM tablas INTO CURSOR tmpCur1

y en el reporte unicamente le indicas que trabajaras con un alias = tmpCur1
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