diff --git a/PROYECTO/cpdir/cpfmrp002.per b/PROYECTO/cpdir/cpfmrp002.per index 35a4314..7311e7c 100644 --- a/PROYECTO/cpdir/cpfmrp002.per +++ b/PROYECTO/cpdir/cpfmrp002.per @@ -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; diff --git a/PROYECTO/cpdir/cpprrp002.4gl b/PROYECTO/cpdir/cpprrp002.4gl index 3adcaa2..7ed9943 100644 --- a/PROYECTO/cpdir/cpprrp002.4gl +++ b/PROYECTO/cpdir/cpprrp002.4gl @@ -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 diff --git a/PROYECTO/cpdir/cpprrp003.4gl b/PROYECTO/cpdir/cpprrp003.4gl index 34f2ad4..0fe0c83 100644 --- a/PROYECTO/cpdir/cpprrp003.4gl +++ b/PROYECTO/cpdir/cpprrp003.4gl @@ -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 = diff --git a/PROYECTO/cpdir/cpprrp004.4gl b/PROYECTO/cpdir/cpprrp004.4gl index 95430b8..379bbc6 100644 --- a/PROYECTO/cpdir/cpprrp004.4gl +++ b/PROYECTO/cpdir/cpprrp004.4gl @@ -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 = diff --git a/PROYECTO/mbsERP.4pw b/PROYECTO/mbsERP.4pw index 75dda63..9603a58 100644 --- a/PROYECTO/mbsERP.4pw +++ b/PROYECTO/mbsERP.4pw @@ -222,6 +222,18 @@ + + + + + + + + + + + + @@ -229,6 +241,9 @@ + + + diff --git a/PROYECTO/otrodir/msgrp000.4gl b/PROYECTO/otrodir/msgrp000.4gl index f18b7c7..fcacf98 100644 --- a/PROYECTO/otrodir/msgrp000.4gl +++ b/PROYECTO/otrodir/msgrp000.4gl @@ -272,34 +272,21 @@ FUNCTION fdestino(p_destino,p_archivo,p_imprime) END FUNCTION -{ FUNCTION configureOutput(tipo_file) DEFINE tipo_file CHAR(3) - IF NOT fgl_report_loadCurrentSettings(NULL) THEN - RETURN NULL - END IF - # 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() - + -- La API fgl_report_* (Report Writer 2.0) no esta disponible en este + -- FGL 6.00.01. Esta salida (XML/XLS/PDF por handler) no esta soportada + -- en este entorno; usar r_output = 'MA' (impresion clasica) en su lugar. RETURN NULL END FUNCTION FUNCTION getPreviewDevice() 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 RETURN "SVG" ELSE RETURN "PDF" END IF END FUNCTION -}