<?xml version="1.0" encoding="UTF-8" ?>
<report name="ca9300a" orientation="2" lpi="6">
 <description>Stampa tabelle ripartizione analitica</description>
 <font face="Arial" size="8" />
 <section type="Head">
  <field type="Stringa" hidden="1" width="1" pattern="1">
   <source>#TIPO</source>
   <prescript description="H0.0 PRESCRIPT">#THIS @ 
"B" = IF
  "2@" HIDE
  "1@" SHOW
ELSE
  "1@" HIDE
  "2@" SHOW
THEN</prescript>
  </field>
  <field x="1" type="Testo" width="12" pattern="1" text="Ripartizione">
   <font face="Arial" bold="1" size="8" />
  </field>
  <field x="36" type="Testo" width="25" pattern="1" text="Gruppo\Conto\Sottoconto">
   <font face="Arial" bold="1" size="8" />
   <groups>2</groups>
  </field>
  <field x="36" type="Testo" width="10" pattern="1" text="Commessa">
   <font face="Arial" bold="1" size="8" />
   <groups>1</groups>
  </field>
  <field x="77.5" type="Testo" width="14" pattern="1" text="Centro di costo">
   <font face="Arial" bold="1" size="8" />
   <groups>1</groups>
  </field>
  <field x="115" type="Testo" width="8" pattern="1" text="Fase">
   <font face="Arial" bold="1" size="8" />
   <groups>1</groups>
  </field>
  <field x="127.5" type="Testo" width="8" pattern="1" text="Modalit&#E0;">
   <font face="Arial" bold="1" size="8" />
  </field>
  <field x="137" type="Testo" width="4" pattern="1" text="Anno">
   <font face="Arial" bold="1" size="8" />
  </field>
  <field x="142" type="Testo" width="2" pattern="1" text="Ib">
   <font face="Arial" bold="1" size="8" />
  </field>
  <field x="145" type="Testo" width="10" pattern="1" text="Classe mov.">
   <font face="Arial" bold="1" size="8" />
  </field>
  <field x="2" y="1" type="Testo" width="4" pattern="1" text="Riga" />
  <field x="6" y="1" type="Testo" width="10" pattern="1" text="Commessa" />
  <field x="47.5" y="1" type="Testo" width="14" pattern="1" text="Centro di costo" />
  <field x="91" y="1" type="Testo" width="6" pattern="1" text="Fase" />
  <field x="99" y="1" type="Testo" width="10" pattern="1" text="Conto" />
  <field x="140.5" y="1" type="Testo" width="10" pattern="1" text="Ripartizione" />
  <field border="1" x="1" y="2" type="Linea" width="160" height="0" pattern="1" />
 </section>
 <section type="Head" level="1">
  <font face="Arial" bold="1" size="8" />
  <prescript description="H1 PRESCRIPT">#CODCMS @
EMPTY= IF
  101 HIDE
  102 HIDE
THEN
#CODCOSTO @
EMPTY= IF
  103 HIDE
  104 HIDE
THEN</prescript>
  <field border="2" radius="200" x="36" y="0.5" type="Rettangolo" shade_offset="25" width="70" height="4" />
  <field x="41" y="1.5" type="Testo" valign="center" align="center" width="60" height="2" pattern="1" text="STAMPA TABELLE RIPARTIZIONE">
   <font face="Arial" bold="1" size="16" />
  </field>
  <field x="2" y="5.5" type="Testo" width="18" pattern="1" text="Tipo ripartizioni:">
   <font face="Arial" size="8" />
  </field>
  <field x="20" y="5.5" type="Array" width="15" pattern="1">
   <source>#TIPO</source>
   <list>
    <li Value="Batch" Code="B" />
    <li Value="Interattive" Code="I" />
    <li Value="Pareggio" Code="P" />
   </list>
  </field>
  <field border="1" x="1" y="8.5" type="Linea" width="160" height="0" pattern="1" />
  <field x="2" y="6.5" type="Testo" width="12" id="101" pattern="1" text="Commessa:">
   <font face="Arial" size="8" />
  </field>
  <field x="20" y="6.5" type="Stringa" width="20" id="102" pattern="1">
   <source>#CODCMS</source>
  </field>
  <field x="41" y="6.5" type="Stringa" width="60" id="103" pattern="1">
   <prescript description="H1.103 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#102,DESCRIZ</prescript>
  </field>
  <field x="2" y="7.5" type="Testo" width="15" id="103" pattern="1" text="Centro di costo:">
   <font face="Arial" size="8" />
  </field>
  <field x="20" y="7.5" type="Stringa" width="20" id="104" pattern="1">
   <source>#CODCOSTO</source>
  </field>
  <field x="41" y="7.5" type="Stringa" width="60" id="105" pattern="1">
   <prescript description="H1.105 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#104,DESCRIZ</prescript>
  </field>
 </section>
 <section type="Head" level="2">
  <groupby>CODICE</groupby>
  <font face="Arial" bold="1" size="8" />
  <field y="1" type="Stringa" hidden="1" width="1" id="98" pattern="1">
   <source>#TIPO</source>
   <prescript description="H2.98 PRESCRIPT">#THIS @ 
"B" = IF
  "2@" HIDE
  "1@" SHOW
ELSE
  "1@" HIDE
  "2@" SHOW
THEN</prescript>
  </field>
  <field x="1" y="1" type="Stringa" width="8" id="99" pattern="1">
   <source>CODICE</source>
  </field>
  <field x="9" y="1" type="Stringa" width="25" id="100" pattern="1">
   <font face="Arial Narrow" bold="1" size="7" />
   <source>RIP.DESCRIZ</source>
  </field>
  <field x="36" y="1" type="Stringa" width="15" id="101" pattern="1">
   <groups>1</groups>
   <source>RIP.CODCMS</source>
  </field>
  <field x="51.5" y="1" type="Stringa" width="25" id="102" pattern="1">
   <font face="Arial Narrow" size="7" />
   <groups>1</groups>
   <prescript description="H2.102 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#101,DESCRIZ</prescript>
  </field>
  <field x="77.5" y="1" type="Stringa" width="15" id="103" pattern="1">
   <groups>1</groups>
   <source>RIP.CODCOSTO</source>
  </field>
  <field x="93" y="1" type="Stringa" width="25" id="104" pattern="1">
   <font face="Arial Narrow" size="7" />
   <groups>1</groups>
   <prescript description="H2.104 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#103,DESCRIZ</prescript>
  </field>
  <field x="119" y="1" type="Stringa" width="7" id="105" pattern="1">
   <groups>1</groups>
   <source>RIP.CODFASE</source>
  </field>
  <field x="127" y="1" type="Array" align="right" width="10" id="106" pattern="1">
   <source>RIP.TIPORIP</source>
   <list>
    <li Value="Percentuale" Code="0" />
    <li Value="Quote" Code="1" />
    <li Value="Parti" Code="2" />
   </list>
  </field>
  <field x="138" y="1" type="Numero" align="right" width="4" id="107" pattern="1" hide_zero="1">
   <source>RIP.ANNOES</source>
  </field>
  <field x="143" y="1" type="Numero" align="right" width="1" id="108" pattern="1" hide_zero="1">
   <source>RIP.INDBIL</source>
  </field>
  <field x="145" y="1" type="Array" width="10" id="109" pattern="1">
   <source>RIP.CLASSEMOV</source>
   <list>
    <li Value="Tutti" Code="0" />
    <li Value="Normali" Code="1" />
    <li Value="Preventivi" Code="2" />
   </list>
  </field>
  <field x="36" y="1" type="Numero" align="right" width="3" id="201" pattern="1">
   <groups>2</groups>
   <source>RIP.GRUPPO</source>
  </field>
  <field x="40" y="1" type="Numero" align="right" width="3" id="202" pattern="1">
   <groups>2</groups>
   <source>RIP.CONTO</source>
  </field>
  <field x="44" y="1" type="Numero" align="right" width="6" id="203" pattern="1">
   <groups>2</groups>
   <source>RIP.SOTTOCONTO</source>
  </field>
  <field x="51" y="1" type="Stringa" width="50" id="204" pattern="1">
   <groups>2</groups>
   <prescript description="H2.204 PRESCRIPT">MESSAGE ISAMREAD,PCON,GRUPPO=#201!CONTO=#202!SOTTOCONTO=#203,DESCR</prescript>
  </field>
 </section>
 <section type="Body" />
 <section type="Body" level="1">
  <field x="1" type="Numero" align="right" width="2" pattern="1">
   <source>NRIGA</source>
  </field>
  <field x="21.5" type="Stringa" width="25" pattern="1">
   <font face="Arial Narrow" size="7" />
   <prescript description="B1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#101,DESCRIZ</prescript>
  </field>
  <field x="65" type="Stringa" width="25" pattern="1">
   <font face="Arial Narrow" size="7" />
   <prescript description="B1.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#103,DESCRIZ</prescript>
  </field>
  <field x="114.5" type="Stringa" width="25" pattern="1">
   <font face="Arial Narrow" size="7" />
   <source>CODCONTO</source>
   <prescript description="B1.0 PRESCRIPT">CA_FORMAT_CONTO_DESCR</prescript>
  </field>
  <field x="140.5" type="Numero" align="right" width="10" pattern="1">
   <source>RIPARTO</source>
  </field>
  <field x="4" type="Stringa" width="17" id="101" pattern="1">
   <source>CODCMS</source>
  </field>
  <field x="47.5" type="Stringa" width="17" id="103" pattern="1">
   <source>CODCOSTO</source>
  </field>
  <field x="91" type="Stringa" width="7" id="105" pattern="1">
   <source>CODFASE</source>
  </field>
  <field x="99" type="Stringa" width="15" id="107" pattern="1">
   <source>CODCONTO</source>
   <prescript description="B1.107 PRESCRIPT">CA_FORMAT_CONTO</prescript>
  </field>
 </section>
 <section type="Foot">
  <field border="1" y="0.5" type="Linea" width="160" height="0" pattern="1" />
  <field x="2" y="1" type="Testo" width="12" pattern="1" text="Data stampa:" />
  <field x="14" y="1" type="Data" width="10" pattern="1">
   <source>#SYSTEM.DATE</source>
  </field>
  <field x="145" y="1" type="Testo" width="5" pattern="1" text="Pag." />
  <field x="150" y="1" type="Numero" align="right" width="3" pattern="1">
   <source>#REPORT.PAGE</source>
  </field>
 </section>
 <section type="Foot" level="1" />
 <section type="Foot" level="2" />
 <sql>USE RRIP
SELECT (BETWEEN(CODCMS,#CODCMS,#CODCMS))&#26;&#26;(BETWEEN(CODCOSTO,#CODCOSTO,#CODCOSTO))
JOIN RIP INTO TIPO==TIPO CODICE==CODICE
FROM TIPO=#TIPO CODICE=#DACODICE
TO TIPO=#TIPO CODICE=#ACODICE</sql>
</report>