USE 37                         
JOIN 9 INTO CODDITTA=CODDITTA
JOIN 6 TO 9 ALIAS 106 INTO TIPOA=TIPOA CODANAGR=CODANAGR
JOIN 8 TO 106@ ALIAS 108 INTO CODANAGR=CODANAGR
JOIN 13 TO 108@ ALIAS 113 INTO COM==COMNASC
JOIN 13 TO 106@ ALIAS 213 INTO COM==COMRF(COMRES)
JOIN 72 TO 37 INTO CODDITTA=CODDITTA 
JOIN 73 TO 37 INTO CODDITTA=CODDITTA
JOIN 74 TO 37 INTO CODDITTA=CODDITTA
JOIN 75 TO 37 INTO CODDITTA=CODDITTA
JOIN 76 TO 37 INTO CODDITTA=CODDITTA
JOIN 77 TO 37 INTO CODDITTA=CODDITTA
JOIN 36 TO 37 INTO CODDITTA=CODDITTA 
JOIN %CAF TO 36 ALIAS 104 INTO CODTAB==CODCAAF
JOIN 9 TO 36 INTO CODDITTA=CODDITTA
JOIN 6 TO  9 INTO TIPOA=TIPOA CODANAGR=CODANAGR
JOIN 8 TO 36 ALIAS 108 INTO CODANAGR==CODPRO
JOIN 6 TO  8 ALIAS 106 INTO TIPOA="F" CODANAGR=CODANAGR 
END

DESCRIPTION
BEGIN
  36->* "Base 770"
  37->* "Basebis 770" 
  72->* "Quadro N"   
  73->* "Quadro P"  
  74->* "Quadro Q"  
  75->* "Quadro R"  
  76->* "Quadro S"          
  77->* "Quadro T"  
END

GENERAL
BEGIN
  OFFSET 0 0
  FONT "Courier 17cpi"
  SIZE 10
  CA "X"           
  IN 3 2
  FI 131
END

SECTION HEADER FIRST 8

NUMERO 12
BEGIN
  KEY "NUMERO FOGLIO"
  PROMPT 128 1 ""
END

LISTA 1
BEGIN
 KEY "Tipo anagrafica"
 FLAGS "H"
 FIELD 106@->TIPOA
 ITEM "F|Fisica" MESSAGE SHOW,1@|HIDE,2@
 ITEM "G|Giuridica" MESSAGE SHOW,2@|HIDE,1@
END

STRINGA 2
BEGIN
 KEY "CODICE FISCALE"
 PROMPT 21 5 ""
 FIELD 106@->COFI
END

STRINGA 3
BEGIN
 KEY "RAGIONE SOCIALE (o cognome)"
 PROMPT 51 5 ""
 GROUP  2
 FIELD 106@->RAGSOC
END

STRINGA 4
BEGIN
 KEY "COGNOME (o ragsoc)"
 PROMPT 51 5 ""
 GROUP  1
 FIELD 106@->RAGSOC[1,30]
END

STRINGA 5
BEGIN
 KEY "NOME"
 PROMPT 21 8 ""
 GROUP  1
 FIELD 106@->RAGSOC[31,50]
END

LISTA 6
BEGIN
  KEY "SESSO M"
  PROMPT 53 8 ""  
  ITEM " | "
  ITEM "M|X"
  ITEM "F|"
  FIELD 108@->SESSO
  GROUP 1
END  

LISTA 7
BEGIN
  KEY "SESSO F"
  PROMPT 62 8 ""
  ITEM " | "  
  ITEM "M|"
  ITEM "F|X"
  FIELD 108@->SESSO
  GROUP 1
END  
  
STRINGA 8
BEGIN
  KEY "DATA DI NASCITA"
  PROMPT 68 8 ""
  GROUP  1
  FIELD 108@->DATANASC
  PICTURE "## ^ ##  ^^###"  
END

STRINGA 9
BEGIN
 KEY "COMUNE DI NASCITA"
 PROMPT 85 8 ""
 GROUP  1
 FIELD 113@->DENCOM
END

STRINGA 10
BEGIN
 KEY "PROV. DI NASCITA"
 PROMPT 129 8 ""
 GROUP  1
 FIELD 113@->PROVCOM
END
           
STRINGA 11
BEGIN
 KEY "CODICE FISCALE DEL SOGGETTO DICHIARANTE"
 PROMPT 56 10 ""
END

END

SECTION BODY ODD 1

NUMERO 1
BEGIN
  KEY "MeseRif"
  PROMPT 25 1 ""
END

NUMERO 2
BEGIN
  KEY "AnnoRif"
  PROMPT 28 1 ""
END

NUMERO 3
BEGIN
  KEY "imp. rimb"
  PROMPT 37 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 4
BEGIN
  KEY "Compensi"
  PROMPT 58 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 5
BEGIN
  KEY "MeseRif"
  PROMPT 83 1 ""
END

NUMERO 6
BEGIN
  KEY "AnnoRif"
  PROMPT 86 1 ""
END

NUMERO 7
BEGIN
  KEY "imp. rimb"
  PROMPT 96 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 8
BEGIN
  KEY "Compensi"
  PROMPT 116 1 ""
  PICTURE "###.###.###.###^^^"      
END

END

SECTION BODY EVEN 1

NUMERO 1
BEGIN
  KEY "R - MeseRif"
  PROMPT 25 1 ""
END

NUMERO 2
BEGIN
  KEY "R - AnnoRif"
  PROMPT 28 1 ""
END

NUMERO 3
BEGIN
  KEY "R - imp. rimb"
  PROMPT 37 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 4
BEGIN
  KEY "R - Compensi"
  PROMPT 58 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 5
BEGIN
  KEY "R - MeseRif"
  PROMPT 83 1 ""
END

NUMERO 6
BEGIN
  KEY "R - AnnoRif"
  PROMPT 86 1 ""
END

NUMERO 7
BEGIN
  KEY "R - imp. rimb"
  PROMPT 96 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 8
BEGIN
  KEY "R - Compensi"
  PROMPT 116 1 ""
  PICTURE "###.###.###.###^^^"      
END

END

SECTION HEADER EVEN 1

NUMERO 1
BEGIN
  KEY "PS Imp.versata"
  PROMPT 22 1 ""
  PICTURE "###.###.###.###^^^"        
END

NUMERO 2
BEGIN
  KEY "PS Inter.lav.dip"
  PROMPT 38 1 ""
  PICTURE "###.###.###.###^^^"        
END

NUMERO 3
BEGIN
  KEY "PS Inter.dat.lav."
  PROMPT 53 1 ""
  PICTURE "###.###.###.###^^^"        
END

STRINGA 4
BEGIN
  KEY "PS Modalita' vers"
  PROMPT 73 1 ""
END

STRINGA 5
BEGIN
  KEY "PS Cod.trib"
  PROMPT 80 1 ""
END

DATA 6
BEGIN
  KEY "PS DATA VERS."
  PROMPT 89 1 ""
  PICTURE "## ^ ## ^####" 
END  

STRINGA 7
BEGIN
  KEY "PS Serie"
  PROMPT 107 1 ""
END
  
STRINGA 8
BEGIN
  KEY "PS Numero"
  PROMPT 117 1 ""
END

END

SECTION FOOTER EVEN 1

NUMERO 1
BEGIN
  KEY "Q Mese paga"
  PROMPT 25 1 ""
END

NUMERO 2
BEGIN
  KEY "Q Anno paga"
  PROMPT 28 1 ""
END

NUMERO 3
BEGIN
  KEY "Q Contr.versato"
  PROMPT 46 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 4
BEGIN
  KEY "Q Contr.rimborsati"
  PROMPT 75 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 5
BEGIN
  KEY "Q Interes.e/o soprattasse"
  PROMPT 104 1 ""
  PICTURE "###.###.###.###^^^"      
END

STRINGA 6
BEGIN
  KEY "Q Cod.Reg"
  PROMPT 126 1 ""
END

END

SECTION FOOTER ODD 1

NUMERO 1
BEGIN
  KEY "T Mese paga"
  PROMPT 25 1 ""
END

NUMERO 2
BEGIN
  KEY "T Anno paga"
  PROMPT 28 1 ""
END

NUMERO 3
BEGIN
  KEY "T Contr.versato"
  PROMPT 46 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 4
BEGIN
  KEY "T Contr.rimborsati"
  PROMPT 75 1 ""
  PICTURE "###.###.###.###^^^"      
END

NUMERO 5
BEGIN
  KEY "T Interes.e/o soprattasse"
  PROMPT 104 1 ""
  PICTURE "###.###.###.###^^^"      
END

STRINGA 6
BEGIN
  KEY "T Cod.Reg"
  PROMPT 126 1 ""
END

END

SECTION FOOTER FIRST 2

DATA 1
BEGIN
  KEY "Data"
  PROMPT 29 1 ""
  FLAGS "A"
END

STRINGA 2
BEGIN
  KEY "FIRMA"
  PROMPT 90 1 ""
  FIELD 106@->RAGSOC
END

END

END



