cpprrp002 (Saldos por Antiguedad): exportacion a PDF/Excel/pantalla

- Vuelve a configureOutput() (modo compatibilidad de GRE, como en 3.20) en
  lugar del XML crudo en FGLSPOOL, que no era ni PDF ni Excel.
- El formato se elige en la ventana comun seleccionarsalida() (EXCEL / PDF /
  SCREEN); se quita del formulario cpfmrp002 el grupo 'Opciones Salidas',
  al que no se llegaba con Enter. La opcion MATRICIAL deja de ofrecerse.
- RIGHT MARGIN 145: la linea llega a la columna 143 y con el ancho por
  defecto (132) la columna Total salia cortada.
Verificado contra la BD .250 (grupo 25, corte 20/10/2026): PDF de 12 paginas
con totales completos. Excel generado en prueba local; falta confirmarlo en
el GDC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Abel López
2026-10-20 17:02:56 -04:00
co-authored by Claude Opus 5.5
parent 4e3993daf8
commit 3bb4b58216
2 changed files with 4 additions and 16 deletions
-9
View File
@@ -10,7 +10,6 @@
<RecordField colName="total4" fieldIdRef="5" name="total4" sqlTabName="formonly" sqlType="DECIMAL" table_alias_name="" uid="{7b3e519a-5aa7-41c8-97d1-ed500eb68b10}"/>
<RecordField colName="total6" fieldIdRef="7" name="total6" sqlTabName="formonly" sqlType="DECIMAL" table_alias_name="" uid="{32d2bde6-9b8d-48b3-8a40-8ccd93a5ca6b}"/>
<RecordField colName="total5" fieldIdRef="6" name="total5" sqlTabName="formonly" sqlType="DECIMAL" table_alias_name="" uid="{27b7fa06-6d88-4eba-afeb-c2ab80a2cd40}"/>
<RecordField colName="" defaultValue="MA" fieldIdRef="8" name="r_output" sqlTabName="" table_alias_name="" uid="{07894f4f-beae-4e6a-baa2-edd6bd6233b7}"/>
</Record>
<Form gridHeight="24" gridWidth="80" name="cpfmrp002">
<Grid gridHeight="24" gridWidth="80" name="Grid1" posX="0" posY="0">
@@ -28,14 +27,6 @@
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="total4" columnCount="" fieldId="5" gridHeight="1" gridWidth="14" name="total4" noEntry="true" posX="50" posY="4" rowCount="" sqlTabName="formonly" sqlType="DECIMAL" stepX="" stepY="" tabIndex="6" table_alias_name="" widget="Edit"/>
<Label posX="34" posY="5" text="Total Mas 120"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="total6" columnCount="" fieldId="7" gridHeight="1" gridWidth="14" name="total6" noEntry="true" posX="50" posY="5" rowCount="" sqlTabName="formonly" sqlType="DECIMAL" stepX="" stepY="" tabIndex="7" table_alias_name="" widget="Edit"/>
<Group gridHeight="10" gridWidth="28" name="Group1" posX="5" posY="6" text="Opciones Salidas">
<RadioGroup aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" columnCount="" defaultValue="MA" fieldId="8" gridHeight="6" gridWidth="21" items="MATRICIAL, SCREEN, ACROBAT READER, EXCEL" name="r_output" posX="3" posY="2" rowCount="" sqlTabName="" stepX="" stepY="" tabIndex="9" table_alias_name="" title="RadioGroup1" widget="RadioGroup">
<Item lstrtext="false" name="MA" text="MATRICIAL"/>
<Item lstrtext="false" name="SVG" text="SCREEN"/>
<Item lstrtext="false" name="PDF" text="ACROBAT READER"/>
<Item lstrtext="false" name="XLS" text="EXCEL"/>
</RadioGroup>
</Group>
<Label posX="34" posY="6" text="Total Saldo"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="total5" columnCount="" fieldId="6" gridHeight="1" gridWidth="14" name="total5" noEntry="true" posX="50" posY="6" rowCount="" sqlTabName="formonly" sqlType="DECIMAL" stepX="" stepY="" tabIndex="8" table_alias_name="" widget="Edit"/>
</Grid>
+4 -7
View File
@@ -11,7 +11,6 @@ GLOBALS "cpprgb000.4gl"
DEFINE fecha_corte DATE
DEFINE cod_sp1 SMALLINT
DEFINE idx_1, idx_2 SMALLINT
DEFINE p_reportfile STRING
DEFINE doccli9 RECORD
cod_sp SMALLINT,
cod_sp_sec SMALLINT,
@@ -62,7 +61,7 @@ DEFINE valor1,valor2,valor3 DECIMAL(12,2)
CALL msgrp000(tipo_papel)
INPUT BY NAME fecha_corte,cod_sp1,r_output
INPUT BY NAME fecha_corte,cod_sp1
BEFORE FIELD fecha_corte
LET fecha_corte = today
@@ -88,6 +87,7 @@ DEFINE valor1,valor2,valor3 DECIMAL(12,2)
LET int_flag = false
RETURN
END IF
CALL seleccionarsalida() RETURNING r_output
# Busca valor de las facturas cuyas fechas de vencimiento son menores
# a la fecha de corte
@@ -125,11 +125,7 @@ DEFINE valor1,valor2,valor3 DECIMAL(12,2)
START REPORT reporte31 TO archivo
ELSE
-- 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)
CALL configureoutput(r_output) RETURNING handler
START REPORT reporte31 TO XML HANDLER handler
END IF
END IF
@@ -191,6 +187,7 @@ END FUNCTION
DEFINE dias INTEGER
OUTPUT
RIGHT MARGIN 145
TOP MARGIN 0
LEFT MARGIN 0
BOTTOM MARGIN 2