Añadir cpprrp002, cpprrp003 y cpprrp004; corregir reportes XML y formulario cpfmrp002

- cpprgb000/msgrp000: restaurar getPreviewDevice con case correcto
  (ui.Interface.frontCall) y dejar configureOutput como stub, ya que la
  API fgl_report_* no existe en este FGL 6.00.01.
- cpprrp002/003/004: sustituir configureoutput()/handler roto por
  om.XmlWriter.createFileWriter escribiendo a FGLSPOOL, usando STRING
  para la ruta (CHAR(80) truncaba la ruta larga del proyecto).
- cpfmrp002.per: agregar campo faltante "Salida" (r_output) que el
  programa ya esperaba.
- mbsERP.4pw: registrar cpprrp002/003/004 con sus dependencias,
  entorno FGLSPOOL y configuracion de prueba.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Abel López
2026-08-24 17:04:18 -04:00
co-authored by Claude Sonnet 5
parent fd01d27119
commit fa1b51c33e
6 changed files with 50 additions and 30 deletions
+6 -4
View File
@@ -2,9 +2,9 @@ database smarmotech
screen size 24 by 80
{
Fecha de Corte [c ] Total 1-30 [t1 ]
Fecha de Corte [c ] Total 1-30 [t1 ]
Codigo Suplidor [cd] Total 31-60 [t2 ]
Total 61-90 [t3 ]
Salida [sa ] Total 61-90 [t3 ]
Total 91 a 120 [t4 ]
Total Mas 120 [t6 ]
Total Saldo [t5 ]
@@ -14,9 +14,11 @@ end
tables
cptb00001
attributes
c = formonly.fecha_corte type date, autonext, format = "dd/mm/yy",
comments = "Digite la fecha de Corte del Reporte";
c = formonly.fecha_corte type date, autonext, format = "dd/mm/yy",
comments = "Digite la fecha de Corte del Reporte";
cd = formonly.cod_sp1 type smallint;
sa = formonly.r_output type char, upshift,
comments = "MA = Impresion clasica";
t1 = formonly.total1 type decimal(10,2),noentry;
t2 = formonly.total2 type decimal(10,2),noentry;
t3 = formonly.total3 type decimal(10,2),noentry;
+8 -3
View File
@@ -8,9 +8,10 @@ FECHA REALIZACION : Junio 16, 1993
}
GLOBALS "cpprgb000.4gl"
DEFINE fecha_corte DATE
DEFINE fecha_corte DATE
DEFINE cod_sp1 SMALLINT
DEFINE idx_1, idx_2 SMALLINT
DEFINE idx_1, idx_2 SMALLINT
DEFINE p_reportfile STRING
DEFINE doccli9 RECORD
cod_sp SMALLINT,
cod_sp_sec SMALLINT,
@@ -124,7 +125,11 @@ DEFINE valor1,valor2,valor3 DECIMAL(12,2)
START REPORT reporte31 TO archivo
ELSE
CALL configureoutput(r_output) RETURNING handler
-- La API de configuracion de reportes (fgl_report_*) no esta
-- disponible en este FGL; se escribe el XML directo a un archivo
-- en FGLSPOOL en lugar de la vista previa/exportacion nativa.
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/cpprrp002_saldos.xml"
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
START REPORT reporte31 TO XML HANDLER handler
END IF
END IF
+10 -4
View File
@@ -13,8 +13,9 @@ GLOBALS "cpprgb000.4gl"
DEFINE idx_1, idx_2, idx_3 SMALLINT
DEFINE fecha_inicial, fecha_final DATE
DEFINE salir, salir1, salir3, tipo_venta CHAR(1)
DEFINE selec5, selec6 CHAR(1500)
DEFINE selec5, selec6 CHAR(1500)
DEFINE cod_sp SMALLINT
DEFINE p_reportfile STRING
DEFINE tot_gen1 RECORD
totald DECIMAL(10,2),
@@ -145,9 +146,14 @@ FUNCTION cpprrp003()
# doble_on,doble_off,comp_on,comp_off,
# doce,normal,archivo,copia
#START REPORT reporte61 TO archivo
CALL configureoutput("SVG") RETURNING handler
-- La API de configuracion de reportes (fgl_report_*) no esta
-- disponible en este FGL; se escribe el XML directo a un archivo
-- en FGLSPOOL en lugar de la vista previa SVG.
-- (usa STRING, no "archivo" CHAR(80): la ruta del proyecto supera
-- los 80 caracteres y se truncaba)
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/cpprrp003_mayor.xml"
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
START REPORT reporte61 TO XML HANDLER handler
LET selec5 =
+7 -2
View File
@@ -14,8 +14,9 @@ GLOBALS "cpprgb000.4gl"
DEFINE idx_1, idx_2, idx_3 SMALLINT
DEFINE fecha_inicial, fecha_final DATE
DEFINE salir, salir2, salir1, salir3, tipo_venta CHAR(1)
DEFINE selec5, selec6 CHAR(1500)
DEFINE selec5, selec6 CHAR(1500)
DEFINE valor2,valor3 DECIMAL(18,2)
DEFINE p_reportfile STRING
DEFINE tot_gen1 RECORD
totald DECIMAL(10,2),
@@ -173,7 +174,11 @@ FUNCTION cpprrp004()
doble_on,doble_off,comp_on,comp_off,
doce,normal,archivo,copia
CALL configureoutput("SVG") RETURNING handler
-- La API de configuracion de reportes (fgl_report_*) no esta
-- disponible en este FGL; se escribe el XML directo a un archivo
-- en FGLSPOOL en lugar de la vista previa SVG.
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/cpprrp004_estcta.xml"
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
START REPORT report141 TO XML HANDLER handler
LET selec5 =