Corrige ipprrp054 (Revision de Conduces con y sin Archivo)

- Registra ipfmrp054.4fd y la dependencia FUNCIONESREPORT en mbsERP.4pw
- seleccionarsalida() -> selectOutputSimple()
- Rescata ipprrp054.4rp del respaldo PROYECTOS/bin (ipdir/ y bin/)
- El reporte arrancaba aunque la consulta no devolviera filas y el motor
  fallaba (Failed to find value for the look ahead input-variables);
  ahora START REPORT se ejecuta con la primera fila y, si no hay datos,
  muestra "NO EXISTEN REGISTROS"
- Titulo de ventana corregido

Verificado: 05/01/2026 a 10/15/2026 genera 100 paginas en pantalla y PDF.
Nota: las fechas de este formulario se capturan en formato mm/dd/yyyy
(campo Edit sin selector), comportamiento original del programa.
Excel no probado.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 13:16:11 -04:00
co-authored by Claude Sonnet 5.5
parent 47942191ee
commit fc2fa7acac
4 changed files with 160 additions and 21 deletions
+28 -20
View File
@@ -34,6 +34,7 @@ FUNCTION ipprrp054()
OPEN FORM ipfmrp054 FROM "ipfmrp054"
DISPLAY FORM ipfmrp054
CALL ui.Window.getCurrent().setText("Conduces con y sin Archivo")
INPUT BY NAME fecha1,fecha2
BEFORE INPUT
AFTER INPUT
@@ -50,27 +51,34 @@ FUNCTION ipprrp054()
LET r_filename = "ipprrp054.4rp"
CALL seleccionarsalida() RETURNING r_output
iF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file
LET preview=1
CALL fgl_report_selectDevice(r_output) -- changing default
CALL fgl_report_selectPreview(preview) -- changing default
LET handler = fgl_report_commitCurrentSettings() -- commit changes
ELSE
EXIT PROGRAM
END IF
START REPORT prt_co TO XML HANDLER HANDLER
PREPARE comando FROM selec
DECLARE busca CURSOR FOR comando
OPEN busca USING fecha1,fecha2
PREPARE comando FROM selec
DECLARE busca CURSOR FOR comando
OPEN busca USING fecha1,fecha2
LET idx = 0
FOREACH busca INTO co.*
IF idx = 0 THEN
CALL selectOutputSimple() RETURNING r_output
IF fgl_report_loadCurrentSettings(r_filename) THEN
LET preview = 1
CALL fgl_report_selectDevice(r_output)
CALL fgl_report_selectPreview(preview)
LET handler = fgl_report_commitCurrentSettings()
ELSE
EXIT PROGRAM
END IF
START REPORT prt_co TO XML HANDLER HANDLER
LET idx = 1
END IF
OUTPUT TO REPORT prt_co(co.*)
END FOREACH
IF idx = 1 THEN
FINISH REPORT prt_co
ELSE
CALL fgl_winmessage("INFO", "NO EXISTEN REGISTROS", "INFO")
END IF
FOREACH busca INTO co.*
OUTPUT TO REPORT prt_co(co.*)
END FOREACH
FINISH REPORT prt_co
END INPUT
END FUNCTION
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<report:Report xmlns:rtl="http://www.4js.com/2004/RTL" xmlns:report="http://www.4js.com/2007/REPORT" xmlns="http://www.4js.com/2004/PXML" gstVersion="31405" version="6.00">
<report:Settings RWPageWidth="a4width" RWPageLength="a4length" RWLeftMargin="1.3cm" RWTopMargin="1.3cm" RWRightMargin="1.3cm" RWBottomMargin="1.3cm">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="../ipdir/ipprrp054.rdd" RWFglReportName="prt_co"/>
<report:Conflicts/>
<rtl:stylesheet>
<PXML>
<rtl:match name="Report" nameConstraint="Report" minOccurs="1" maxOccurs="1">
<MINIPAGE name="Page Root" width="max" length="max">
<LAYOUTNODE name="Page Header" width="max" length="min" port="anyPageHeader">
<MINIPAGE name="StripeLayouter3" width="min" length="max" layoutDirection="leftToRight">
<rtl:input-variable name="p_companias.nombre" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="Report Title" x="0" y="max/2" anchorX="0" anchorY="0.5" alignment="baseline" fontSize="25" baselineType="leftleft" floatingBehavior="enclosed" text="{{p_companias.nombre.trim()}}"/>
<PAGENOBOX name="PageNoBox" x="1.23857" y="max" anchorX="0" anchorY="1" alignment="baseline" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right"/>
<WORDBOX name="WordBox" floatingBehavior="enclosed" text="IPPRRP054"/>
<rtl:input-variable name="fecht" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox1" y="15cm" floatingBehavior="enclosed" text="{{fecht.trim()}}"/>
<WORDBOX name="WordBox10" x="1cm" y="7cm" fontBold="true" floatingBehavior="enclosed" text="Revision de Conduces"/>
<rtl:input-variable name="fecha1" type="FGLString" expectedLocation="expectedAhead"/>
<rtl:input-variable name="fecha2" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox11" x="1.5cm" y="7cm" floatingBehavior="enclosed" text="{{fecha1.trim()+&quot; AL &quot;+fecha2.trim()}}"/>
</MINIPAGE>
<MINIPAGE name="Separator1" width="1" length="max" bgColor="#000000" layoutDirection="leftToRight"/>
<MINIPAGE name="Table Header" class="grwTableHeader" width="min" length="max" layoutDirection="leftToRight">
<WORDBOX name="Spacer" alignment="baseline" baselineType="leftleft" port="itemSeparator" text=" "/>
<WORDBOX name="WordBox2" floatingBehavior="enclosed" text="{{&quot;Num. Documento&quot;}}"/>
<WORDBOX name="WordBox3" y="4cm" floatingBehavior="enclosed" text="Cliente"/>
<WORDBOX name="WordBox8" y="11cm" floatingBehavior="enclosed" text="Estado"/>
<WORDBOX name="WordBox12" y="14cm" floatingBehavior="enclosed" text="Fecha Creacion"/>
</MINIPAGE>
<MINIPAGE name="Separator" width="1" length="max" bgColor="#000000" layoutDirection="leftToRight"/>
</LAYOUTNODE>
<rtl:match name="Group cod_mov" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="Table Row1" class="grwTableRow" width="min" length="max" layoutDirection="leftToRight">
<WORDBOX name="Spacer_2" alignment="baseline" baselineType="leftleft" port="itemSeparator" text=" "/>
<rtl:input-variable name="titulo_mov" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox5" fontBold="true" floatingBehavior="enclosed" text="{{titulo_mov.trim()}}"/>
</MINIPAGE>
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="Table Row" class="grwTableRow" width="min" length="max" alignment="near" fontSize="8" layoutDirection="leftToRight">
<WORDBOX name="Spacer_1" alignment="baseline" baselineType="leftleft" port="itemSeparator" text=" "/>
<rtl:input-variable name="x.num_doc" type="FGLNumeric" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox6" width="2cm" floatingBehavior="enclosed" textAlignment="left" text="{{x.num_doc.format(&quot;&lt;&lt;&lt;&lt;&quot;)}}"/>
<rtl:input-variable name="x.cod_sp" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="x.cod_sp_sec" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="x.nombre" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="WordWrapBox" y="4cm" width="max/3" alignment="baseline" floatingBehavior="enclosed" text="{{x.cod_sp.format(&quot;&lt;&lt;&quot;)+&quot;-&quot;+x.cod_sp_sec.format(&quot;&lt;&lt;&lt;&lt;&quot;)+&quot; &quot;+x.nombre.trim()}}"/>
<rtl:input-variable name="x.v_estado" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox9" y="11cm" floatingBehavior="enclosed" text="{{x.v_estado.trim()}}"/>
<rtl:input-variable name="x.fecha" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox13" y="14cm" floatingBehavior="enclosed" text="{{x.fecha.trim()}}"/>
</MINIPAGE>
</rtl:match>
</rtl:match>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>