REPORTE SOLO MUESTRA EL PRIMER REGISTRO DE GRID
Publicado por DANIEL CORDOVA (21 intervenciones) el 01/09/2016 15:04:50
Estimados espero puedan darme un alcance para solucionar mi error en el que estoy trabado
Tengo un formulario facturas donde hay un grid que muestra los registros de la tabla facturas_enc en un cursor CRSFACTURAS, aquí todo me funciona bien el filtrado la selección, etc
En este formulario tengo un botón para imprimir con los siguientes datos:
Datos:
1.- lEl reporte muestra en el encabezado los datos de la tabla facturas_enc y el detalle muestra los datos de de la tabla cursor CRSDETALLE
2.- para el filtrado nrofactura=xnrofactura lo toma DE LA POSICION ACTUAL DE LA GRID que contiene los campos nrofactura, nombre cliente, importe y cantidad
3.- no tengo tablas en el data envioriment
EL ERROR ES QUE CUANDO DOY CLICK PARA VISUALIZAR SOLO ME MUESTRA EL PRIMER REGISTRO DE LA GRID, esta clavado alli
Tengo un formulario facturas donde hay un grid que muestra los registros de la tabla facturas_enc en un cursor CRSFACTURAS, aquí todo me funciona bien el filtrado la selección, etc
En este formulario tengo un botón para imprimir con los siguientes datos:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
PUBLIC xnrofactura,xsecuenc,xcod_pedido,nSubtotalD,igvD,nSubtotalS ,igvS
nSubtotalD = 0igvD = 0nSubtotalS = 0igvS = 0*!* SELECT facturas_enc
*!* xnrofactura = nrofactura
*!* xmoneda = moneda
*!* ximpuesto = impuesto
*!* xnom_client = nom_client
*!* xfechaentre = fechaentre
*!* xruc = ruc
*!* xdireccion = direccion
*!* xdetalle = detalle
*!* xcondicion = condicion
SELECT facturas_enc
xnrofactura = nrofacturaxsecuenc = secuencxcod_pedido = cod_pedidoxcod_client = cod_clientxnom_client = nom_clientxproforma = proformaxdetalle = detallexfechapedid = fechapedidxfechaentre = fechaentrexdireccion = direccionxciudaddest = ciudaddestxregiondest = regiondestxpaisdestin = paisdestinxmoneda = monedaximpuesto = impuestoxdescuento = descuentoxtotal = totalxtcambio = tcambioxruc = rucxrelacioigv = relacioigvxcondicion = condicionxvendedor = vendedorxtelefono = telefonoxalmacen = almacenSELECT * FROM facturas_det WHERE xsecuenc = secuenc AND xcod_pedido = cod_pedido AND !DELETED() ORDER BY nro_guia, itemdeta INTO CURSOR CrsDetalle
SELECT CrsDetalle
GO top
*si el tipo de moneda es dólares llama al reporte DolaresIF SUBSTR(ALLTRIM(xmoneda),1,1) = "D"
SUM ROUND(totald,2) TO nSubtotalD
igvD = ROUND(nSubtotalD*ximpuesto/100,2)
*******-----------------------------********
SET PROCEDURE TO letrasnum.prg ADDITIVEPUBLIC string, TIPMONEDA, WMONEDA
TIPMONEDA = "DÓLARES"
WMONEDA = "$"
=numerosaletras(nSubtotalD+igvD,TIPMONEDA)
enletras = string*******------------------------------*******
IF ximpuesto = 0&&si la factura es sin IGV
REPORT FORM factura_dolares_sigv.frx for nrofactura = thisform.gridfactura.column1.text1.value PREVIEW IN SCREEN &&filtramos los datos a imprimir con FOR
ELSE
REPORT FORM factura_dolares.frx for nrofactura = thisform.gridfactura.column1.text1.value PREVIEW IN SCREEN &&filtramos los datos a imprimir con FOR
ENDIF
ENDIF
*--Si el tipo de moneda es SOLES llama al reporte Soles
IF SUBSTR(ALLTRIM(xmoneda),1,1) = "S"
SUM ROUND(totals,2) TO nSubtotalS
igvS = ROUND(nSubtotalS*ximpuesto/100,2)
*******-----------------------------********
SET PROCEDURE TO letrasnum.prg ADDITIVEPUBLIC string, TIPMONEDA, WMONEDA
TIPMONEDA = "SOLES"
WMONEDA = "S/."
=numerosaletras(nSubtotalS+igvS,TIPMONEDA)
enletras = string*******------------------------------*******
IF ximpuesto = 0&&si la factura es sin IGV
REPORT FORM factura_soles_sigv.frx for nrofactura = xnrofactura PREVIEW IN SCREEN &&filtramos los datos a imprimir con FOR
ELSE
REPORT FORM factura_soles.frx for nrofactura = xnrofactura PREVIEW IN SCREEN &&filtramos los datos a imprimir con FOR
ENDIF
ENDIF
USE IN CrsDetalle
SELECT facturas_enc
SET FILTER TO &&Desactiva todos los filtros
thisform.RefreshDatos:
1.- lEl reporte muestra en el encabezado los datos de la tabla facturas_enc y el detalle muestra los datos de de la tabla cursor CRSDETALLE
2.- para el filtrado nrofactura=xnrofactura lo toma DE LA POSICION ACTUAL DE LA GRID que contiene los campos nrofactura, nombre cliente, importe y cantidad
3.- no tengo tablas en el data envioriment
EL ERROR ES QUE CUANDO DOY CLICK PARA VISUALIZAR SOLO ME MUESTRA EL PRIMER REGISTRO DE LA GRID, esta clavado alli
Valora esta pregunta


0

