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:
co-authored by
Claude Sonnet 5
parent
fd01d27119
commit
fa1b51c33e
@@ -2,9 +2,9 @@ database smarmotech
|
|||||||
screen size 24 by 80
|
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 ]
|
Codigo Suplidor [cd] Total 31-60 [t2 ]
|
||||||
Total 61-90 [t3 ]
|
Salida [sa ] Total 61-90 [t3 ]
|
||||||
Total 91 a 120 [t4 ]
|
Total 91 a 120 [t4 ]
|
||||||
Total Mas 120 [t6 ]
|
Total Mas 120 [t6 ]
|
||||||
Total Saldo [t5 ]
|
Total Saldo [t5 ]
|
||||||
@@ -14,9 +14,11 @@ end
|
|||||||
tables
|
tables
|
||||||
cptb00001
|
cptb00001
|
||||||
attributes
|
attributes
|
||||||
c = formonly.fecha_corte type date, autonext, format = "dd/mm/yy",
|
c = formonly.fecha_corte type date, autonext, format = "dd/mm/yy",
|
||||||
comments = "Digite la fecha de Corte del Reporte";
|
comments = "Digite la fecha de Corte del Reporte";
|
||||||
cd = formonly.cod_sp1 type smallint;
|
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;
|
t1 = formonly.total1 type decimal(10,2),noentry;
|
||||||
t2 = formonly.total2 type decimal(10,2),noentry;
|
t2 = formonly.total2 type decimal(10,2),noentry;
|
||||||
t3 = formonly.total3 type decimal(10,2),noentry;
|
t3 = formonly.total3 type decimal(10,2),noentry;
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ FECHA REALIZACION : Junio 16, 1993
|
|||||||
}
|
}
|
||||||
GLOBALS "cpprgb000.4gl"
|
GLOBALS "cpprgb000.4gl"
|
||||||
|
|
||||||
DEFINE fecha_corte DATE
|
DEFINE fecha_corte DATE
|
||||||
DEFINE cod_sp1 SMALLINT
|
DEFINE cod_sp1 SMALLINT
|
||||||
DEFINE idx_1, idx_2 SMALLINT
|
DEFINE idx_1, idx_2 SMALLINT
|
||||||
|
DEFINE p_reportfile STRING
|
||||||
DEFINE doccli9 RECORD
|
DEFINE doccli9 RECORD
|
||||||
cod_sp SMALLINT,
|
cod_sp SMALLINT,
|
||||||
cod_sp_sec SMALLINT,
|
cod_sp_sec SMALLINT,
|
||||||
@@ -124,7 +125,11 @@ DEFINE valor1,valor2,valor3 DECIMAL(12,2)
|
|||||||
|
|
||||||
START REPORT reporte31 TO archivo
|
START REPORT reporte31 TO archivo
|
||||||
ELSE
|
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
|
START REPORT reporte31 TO XML HANDLER handler
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ GLOBALS "cpprgb000.4gl"
|
|||||||
DEFINE idx_1, idx_2, idx_3 SMALLINT
|
DEFINE idx_1, idx_2, idx_3 SMALLINT
|
||||||
DEFINE fecha_inicial, fecha_final DATE
|
DEFINE fecha_inicial, fecha_final DATE
|
||||||
DEFINE salir, salir1, salir3, tipo_venta CHAR(1)
|
DEFINE salir, salir1, salir3, tipo_venta CHAR(1)
|
||||||
DEFINE selec5, selec6 CHAR(1500)
|
DEFINE selec5, selec6 CHAR(1500)
|
||||||
DEFINE cod_sp SMALLINT
|
DEFINE cod_sp SMALLINT
|
||||||
|
DEFINE p_reportfile STRING
|
||||||
|
|
||||||
DEFINE tot_gen1 RECORD
|
DEFINE tot_gen1 RECORD
|
||||||
totald DECIMAL(10,2),
|
totald DECIMAL(10,2),
|
||||||
@@ -145,9 +146,14 @@ FUNCTION cpprrp003()
|
|||||||
# doble_on,doble_off,comp_on,comp_off,
|
# doble_on,doble_off,comp_on,comp_off,
|
||||||
# doce,normal,archivo,copia
|
# doce,normal,archivo,copia
|
||||||
|
|
||||||
|
|
||||||
#START REPORT reporte61 TO archivo
|
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||||
CALL configureoutput("SVG") RETURNING handler
|
-- 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
|
START REPORT reporte61 TO XML HANDLER handler
|
||||||
|
|
||||||
LET selec5 =
|
LET selec5 =
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ GLOBALS "cpprgb000.4gl"
|
|||||||
DEFINE idx_1, idx_2, idx_3 SMALLINT
|
DEFINE idx_1, idx_2, idx_3 SMALLINT
|
||||||
DEFINE fecha_inicial, fecha_final DATE
|
DEFINE fecha_inicial, fecha_final DATE
|
||||||
DEFINE salir, salir2, salir1, salir3, tipo_venta CHAR(1)
|
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 valor2,valor3 DECIMAL(18,2)
|
||||||
|
DEFINE p_reportfile STRING
|
||||||
|
|
||||||
DEFINE tot_gen1 RECORD
|
DEFINE tot_gen1 RECORD
|
||||||
totald DECIMAL(10,2),
|
totald DECIMAL(10,2),
|
||||||
@@ -173,7 +174,11 @@ FUNCTION cpprrp004()
|
|||||||
doble_on,doble_off,comp_on,comp_off,
|
doble_on,doble_off,comp_on,comp_off,
|
||||||
doce,normal,archivo,copia
|
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
|
START REPORT report141 TO XML HANDLER handler
|
||||||
|
|
||||||
LET selec5 =
|
LET selec5 =
|
||||||
|
|||||||
@@ -222,6 +222,18 @@
|
|||||||
<Configuration commandLineArguments="alopez Lopez2023 70" id="-700000004" label="Configuration"/>
|
<Configuration commandLineArguments="alopez Lopez2023 70" id="-700000004" label="Configuration"/>
|
||||||
<File filePath="cpdir/cpprrp001.4gl"/>
|
<File filePath="cpdir/cpprrp001.4gl"/>
|
||||||
</Application>
|
</Application>
|
||||||
|
<Application binaryName="cpprrp002" dependencies="-594793224,-1026233879,-764824792,1811699727,-1423229125" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="-700000005" label="cpprrp002">
|
||||||
|
<Configuration commandLineArguments="alopez Lopez2023 70" id="-700000006" label="Configuration"/>
|
||||||
|
<File filePath="cpdir/cpprrp002.4gl"/>
|
||||||
|
</Application>
|
||||||
|
<Application binaryName="cpprrp003" dependencies="-594793224,-1026233879,-764824792,1811699727,-1423229125" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="-700000007" label="cpprrp003">
|
||||||
|
<Configuration commandLineArguments="alopez Lopez2023 70" id="-700000008" label="Configuration"/>
|
||||||
|
<File filePath="cpdir/cpprrp003.4gl"/>
|
||||||
|
</Application>
|
||||||
|
<Application binaryName="cpprrp004" dependencies="-594793224,-1026233879,-764824792,1811699727,-1423229125" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="-700000009" label="cpprrp004">
|
||||||
|
<Configuration commandLineArguments="alopez Lopez2023 70" id="-700000010" label="Configuration"/>
|
||||||
|
<File filePath="cpdir/cpprrp004.4gl"/>
|
||||||
|
</Application>
|
||||||
<Library binaryName="FORMULARIOS_CP" id="1811699727" label="FORMULARIOS_CP">
|
<Library binaryName="FORMULARIOS_CP" id="1811699727" label="FORMULARIOS_CP">
|
||||||
<File filePath="cpdir/cpfmmt001.4fd"/>
|
<File filePath="cpdir/cpfmmt001.4fd"/>
|
||||||
<File filePath="cpdir/cpfmmt002.4fd"/>
|
<File filePath="cpdir/cpfmmt002.4fd"/>
|
||||||
@@ -229,6 +241,9 @@
|
|||||||
<File filePath="cpdir/cpfmwd002.per"/>
|
<File filePath="cpdir/cpfmwd002.per"/>
|
||||||
<File filePath="cpdir/cpfmcs001.per"/>
|
<File filePath="cpdir/cpfmcs001.per"/>
|
||||||
<File filePath="cpdir/cpfmrp001.per"/>
|
<File filePath="cpdir/cpfmrp001.per"/>
|
||||||
|
<File filePath="cpdir/cpfmrp002.per"/>
|
||||||
|
<File filePath="cpdir/cpfmrp003.per"/>
|
||||||
|
<File filePath="cpdir/cpfmrp004.per"/>
|
||||||
</Library>
|
</Library>
|
||||||
<Library binaryName="FUNCIONES_CP" dependencies="-1026233879" id="-594793224" label="FUNCIONES_CP">
|
<Library binaryName="FUNCIONES_CP" dependencies="-1026233879" id="-594793224" label="FUNCIONES_CP">
|
||||||
<File filePath="cpdir/cpprgb000.4gl"/>
|
<File filePath="cpdir/cpprgb000.4gl"/>
|
||||||
|
|||||||
@@ -272,34 +272,21 @@ FUNCTION fdestino(p_destino,p_archivo,p_imprime)
|
|||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
FUNCTION configureOutput(tipo_file)
|
FUNCTION configureOutput(tipo_file)
|
||||||
DEFINE tipo_file CHAR(3)
|
DEFINE tipo_file CHAR(3)
|
||||||
IF NOT fgl_report_loadCurrentSettings(NULL) THEN
|
-- La API fgl_report_* (Report Writer 2.0) no esta disponible en este
|
||||||
RETURN NULL
|
-- FGL 6.00.01. Esta salida (XML/XLS/PDF por handler) no esta soportada
|
||||||
END IF
|
-- en este entorno; usar r_output = 'MA' (impresion clasica) en su lugar.
|
||||||
# CALL fgl_report_selectLogicalPageMapping("multipage")
|
|
||||||
# CALL fgl_report_configureMultipageOutput(2, 4, TRUE)
|
|
||||||
CALL fgl_report_setPageMargins("0.5cm","0.5cm","0.5cm","0.5cm")
|
|
||||||
--CALL fgl_report_selectDevice("XLS")
|
|
||||||
# CALL fgl_report_selectDevice(getPreviewDevice())
|
|
||||||
# CALL fgl_report_configureCompatibilityOutput(1,'Franklin Gothic Heavy',false,'existencia',NULL,NULL)
|
|
||||||
CALL fgl_report_selectDevice(tipo_file)
|
|
||||||
CALL fgl_report_configurexlsxdevice(null,null,null,false,false,null,1)
|
|
||||||
CALL fgl_report_selectPreview(TRUE)
|
|
||||||
RETURN fgl_report_commitCurrentSettings()
|
|
||||||
|
|
||||||
RETURN NULL
|
RETURN NULL
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
FUNCTION getPreviewDevice()
|
FUNCTION getPreviewDevice()
|
||||||
DEFINE fename String
|
DEFINE fename String
|
||||||
CALL ui.interface.frontcall("standard", "feinfo", ["fename"],[fename])
|
CALL ui.Interface.frontCall("standard", "feinfo", ["fename"],[fename])
|
||||||
IF fename == "Genero Desktop Client" THEN
|
IF fename == "Genero Desktop Client" THEN
|
||||||
RETURN "SVG"
|
RETURN "SVG"
|
||||||
ELSE
|
ELSE
|
||||||
RETURN "PDF"
|
RETURN "PDF"
|
||||||
END IF
|
END IF
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user