<?xml version="1.0" encoding="UTF-8" ?>
<report name="co1600a" orientation="2" lpi="6" command="ve1 -3">
 <description>Stampa Saldi Estratto Conto</description>
 <font face="Courier New" size="8" />
 <section type="Head">
  <field x="20.7" type="Testo" width="27" pattern="1" text="IBAN">
   <source>101.NUMCC</source>
  </field>
  <field x="79" type="Testo" align="right" width="15" pattern="1" text="Saldo a credito" />
  <field x="95" type="Testo" align="right" width="15" pattern="1" text="Saldo a debito">
   <source>Saldo a debito</source>
  </field>
  <field x="113" type="Testo" width="50" pattern="1" text="Banca &#2F; dipendenza">
   <source>102.S0</source>
  </field>
  <field border="2" y="1" type="Linea" width="170" height="0" pattern="1" />
  <field x="1" type="Testo" width="10" id="101" pattern="1" text="Socio">
   <source>101.CODCF</source>
  </field>
 </section>
 <section type="Head" level="1">
  <field x="71" type="Testo" valign="center" align="center" width="50" height="2" pattern="1" text="STAMPA SALDI ESTRATTO CONTO">
   <font face="Courier New" bold="1" size="14" />
  </field>
  <field x="157.75" y="0.12" type="Testo" width="5" pattern="1" text="Pag." />
  <field x="163.75" y="0.12" type="Numero" align="right" width="5" pattern="1" text="#####">
   <source>#REPORT.PAGE</source>
  </field>
  <field border="2" y="2" type="Linea" width="170" height="0" pattern="1" />
  <field x="3" y="3" type="Testo" width="6" pattern="1" text="Ditta" />
  <field x="10" y="3" type="Stringa" width="60" pattern="1">
   <source>#SYSTEM.RAGSOC</source>
  </field>
  <field x="3" y="4" type="Testo" valign="bottom" width="12" pattern="1" text="Dalla data" />
  <field x="16" y="4" type="Data" valign="bottom" align="right" width="15" pattern="1">
   <source>#DATAINI</source>
  </field>
  <field x="32" y="4" type="Testo" valign="bottom" align="center" width="12" pattern="1" text="alla data" />
  <field x="45" y="4" type="Data" valign="bottom" align="right" width="15" pattern="1">
   <source>#DATAFIN</source>
  </field>
  <field border="2" y="6" type="Linea" width="170" height="0" pattern="1" />
 </section>
 <section type="Head" level="2" hidden="1">
  <groupby>DOC.TIPOCF+DOC.CODCF</groupby>
  <prescript description="H2 PRESCRIPT">MESSAGE RESET,F2.104
MESSAGE RESET,F2.105</prescript>
 </section>
 <section type="Body" />
 <section type="Body" level="1" hidden="1">
  <field x="0.5" type="Numero" align="right" width="3" id="101" pattern="1">
   <source>DOC.CODCF</source>
   <prescript description="B1.101 PRESCRIPT">#THIS @ \ leggo il valore attuale
"F2.101" ! \ lo scrivo nel riepilogo</prescript>
  </field>
  <field x="4" type="Stringa" dynamic_height="1" width="25" height="2" id="102" pattern="1">
   <source>TRIM(CLIFO.RAGSOC[1,30])+" "+TRIM(CLIFO.RAGSOC[31,50])</source>
   <prescript description="B1.102 PRESCRIPT">#THIS @
"F2.102" !</prescript>
  </field>
  <field x="26" y="1" type="Stringa" align="right" width="28.5" id="103" pattern="1">
   <source>CLIFO.IBAN</source>
   <alt_source>CLIFO.NUMCC</alt_source>
   <prescript description="B1.103 PRESCRIPT">#THIS @
"F2.103" !</prescript>
  </field>
  <field x="54" type="Valuta" align="right" width="15" id="104" pattern="1" text="###.###.###,@@">
   <prescript description="B1.104 PRESCRIPT">"DOC.TIPODOC" @ \ leggo il tipo documento
"CONF" = IF \ controllo se &#E8; un conferimento
  "DOC.NETCRED" @
  "F2.104" \ lo devo mettere nella coda del gruppo
ELSE \ se non &#E8; un conferimento
  "DOC.IMPONIBILI" @
  -1 *  \ gli cambio segno
  "F2.104" \ lo metto nella coda del gruppo
THEN
  +! \ lo sommo</prescript>
  </field>
  <field x="54" y="1" type="Valuta" align="right" width="15" id="105" pattern="1" text="###.###.###,@@">
   <prescript description="B1.105 PRESCRIPT">"DOC.TOTRITACC" @
"F2.104" \ lo metto nella coda del gruppo
+! \ lo sommo</prescript>
  </field>
  <field x="70" type="Stringa" dynamic_height="1" width="30" height="2" id="106" pattern="1">
   <source>CLIFO.CODABI+' '+CLIFO.CODCAB+' '+101@.S0+' '+102@.S0</source>
   <prescript description="B1.106 PRESCRIPT">#THIS @
"F2.106" !</prescript>
  </field>
 </section>
 <section type="Foot" />
 <section type="Foot" level="1">
  <field border="2" y="1" type="Linea" width="170" height="0" pattern="1" />
  <field x="55" y="2" type="Testo" width="15" pattern="1" text="TOTALI" />
  <field x="79" y="2" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@" />
  <field x="95" y="2" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
 </section>
 <section type="Foot" level="2">
  <field x="0.5" type="Numero" align="right" width="3" id="101" pattern="1" />
  <field x="4" type="Stringa" width="46" id="102" pattern="1" />
  <field x="50.7" type="Stringa" align="right" width="28.2" id="103" pattern="1" />
  <field x="79" type="Valuta" align="right" width="15" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
   <prescript description="F2.104 PRESCRIPT">#THIS @ \ leggo il valore attuale
DUP \ lo duplico
0 &#3E;= IF \ se &#E8; maggiore di zero
  "0" "F2.105" ! \ scrivo 0 in saldo a debito
ELSE
  -1 * \ canbio segno al valore attuale
  "F2.105" ! \ lo scrivo in saldo a debito
  0 "F2.104" ! \ scrivo 0 in saldo a credito
THEN</prescript>
   <postscript description="F2.104 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
  </field>
  <field x="95" type="Valuta" align="right" width="15" id="105" pattern="1" hide_zero="1" text="###.###.###,@@">
   <postscript description="F2.105 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
  </field>
  <field x="113" type="Stringa" width="70" id="106" pattern="1" />
 </section>
 <sql>USE DOC 
KEY 2
SELECT BETWEEN(DATADOC,#DATAINI,#DATAFIN)
JOIN CLIFO INTO TIPOCF==TIPOCF CODCF==CODCF
JOIN %BAN TO CLIFO ALIAS 101 INTO CODTAB==CODABI
JOIN %BAN TO CLIFO ALIAS 102 INTO CODTAB==CODABI+CODCAB
FROM TIPOCF='F' CODCF=#DASOCIO
TO TIPOCF='F' CODCF=#ASOCIO
</sql>
</report>