USE 61
JOIN %CA7 TO 61 ALIAS 14 INTO CODTAB=CODCAUS
JOIN 9 INTO CODDITTA=CODDITTA
JOIN  6 TO   9 ALIAS 116 INTO TIPOA=TIPOA CODANAGR=CODANAGR
JOIN  8 TO   6 ALIAS 118 INTO CODANAGR=CODANAGR
JOIN 13 TO   8 ALIAS 113 INTO COM=COMNASC
JOIN 13 TO   6 ALIAS 213 INTO COM=COMRF(COMRES)
JOIN  6 TO  61  ALIAS 216 INTO TIPOA=TIPOA CODANAGR=CODANAGR
JOIN  8 TO 216@ ALIAS 218 INTO CODANAGR=CODANAGR
JOIN 13 TO 218@ ALIAS 313 INTO COM=COMNASC
JOIN 13 TO 216@ ALIAS 413 INTO STATO=STATORES COM=COMRES
JOIN %STA TO 216@ ALIAS 24 INTO CODTAB=STATORES
END

DESCRIPTION
BEGIN
  61->* "Quadro C 770"
  9->* "Ditte"
  6->* "Anagrafica persone fisiche e giuridiche"
  8->* "Anagrafica persone fisiche"
  113@->* "Comuni"
  213@->* "Comuni"
  216@->* "Anagrafica persone fisiche e giuridiche"
  218@->* "Anagrafica persone giuridiche"
  313@->* "Comuni"
  413@->* "Comuni"
END

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

SECTION HEADER FIRST 22

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

STRINGA 1 
BEGIN
  KEY "CODICE FISCALE"
  PROMPT 3 9  ""
  FIELD 116@->COFI
END

STRINGA 2
BEGIN
  KEY "RAGIONE SOCIALE"
  PROMPT 39 9  ""
  FIELD 116@->RAGSOC
  GROUP 2
END

STRINGA 3
BEGIN
  KEY "COGNOME"
  PROMPT 39 9 ""
  FIELD 116@->RAGSOC[1,30]
  GROUP 1
END  

STRINGA 4
BEGIN
  KEY "NOME"
  PROMPT 17 11 ""
  FIELD 116@->RAGSOC[31,50]
  GROUP 1
END  

STRINGA 5
BEGIN
  KEY "SESSO"
  PROMPT 59 11 ""
  FIELD 118@->SESSO
  GROUP 1
END  
  
STRINGA 6
BEGIN
  KEY "DATA DI NASCITA"
  PROMPT 63 11 ""
  FIELD 118@->DATANASC
  GROUP 1
END  
  
STRINGA 7
BEGIN
  KEY "COMUNE DI NASCITA"
  PROMPT 83 11 ""
  FIELD 113@->DENCOM
  GROUP 1
END  
  
STRINGA 8
BEGIN
  KEY "PROV. DI NASCITA"
  PROMPT 125 11 ""
  FIELD 113@->PROVCOM
  GROUP 1
END  
  
STRINGA 10
BEGIN
  KEY "COMUNE DI RES.FISCALE"
  PROMPT 17 13 ""
  FIELD 213@->DENCOM
END  
  
STRINGA 11
BEGIN
  KEY "PROV DI RES.FISCALE"
  PROMPT 59 13 ""
  FIELD 213@->PROVCOM
END  
  
STRINGA 12
BEGIN
  KEY "VIA di RES."
  PROMPT 67 13  ""
  FIELD 116@->INDRF  
  FIELD 116@->INDRES
  FLAGS "H"
  MESSAGE COPY,17
END  
  
STRINGA 15
BEGIN
  KEY "NUM. CIVICO di RES."
  PROMPT 103 13 ""
  FIELD 116@->CIVRF 
  FIELD 116@->CIVRES 
  FLAGS "H"
  MESSAGE APPEND,17
END  

STRINGA 17
BEGIN
  KEY "VIA + NUM CIV. DI RES."
  PROMPT 67 13 ""
END
  
STRINGA 16
BEGIN
  KEY "CAP"
  PROMPT 124 13 ""
  FIELD 116@->CAPRF 
  FIELD 116@->CAPRES
END  

STRINGA 13
BEGIN
  KEY "CODICE FISCALE DICHIARANTE"
  PROMPT 105 16  ""
END

NUMBER 14
BEGIN
  KEY "NUM. FOGLIO"
  PROMPT 125 19  ""
END

END

SECTION BODY ODD 6

LISTA 100
BEGIN
 KEY "Tipo anagrafica"
 FIELD 216@->TIPOA
 ITEM "F| " MESSAGE ENABLE,1@|DISABLE,2@
 ITEM "G| " MESSAGE ENABLE,2@|DISABLE,1@
END

STRINGA 1
BEGIN
  KEY "COD.FIS"
  PROMPT 10 1 ""
  FIELD 216@->COFI
END

STRING 2
BEGIN   
  KEY "COGNOME"
  PROMPT 42 1 ""
  FIELD 216@->RAGSOC[1,30]
  GROUP 1
END

STRING 3
BEGIN   
  KEY "NOME"
  PROMPT 81 1 ""
  FIELD 216@->RAGSOC[31,50]
  GROUP 1
END

STRING 4
BEGIN   
  KEY "DATA NASCITA"
  PROMPT 114 1 ""
  FIELD 218@->DATANASC
END

STRING 5
BEGIN   
  KEY "SESSO"
  PROMPT 129 1 ""
  FIELD 218@->SESSO
END

STRING 6
BEGIN
  KEY "COMUNE DI NASCITA"
  PROMPT 10 3 ""
  FIELD 313@->DENCOM
  GROUP 1
END

STRING 7
BEGIN
  KEY "PROV DI NASCITA"
  PROMPT 47 3 ""
  FIELD 313@->PROVCOM
  GROUP 1
END

STRING 8
BEGIN
  KEY "COMUNE DI RESIDENZA"
  PROMPT 53 3 ""
  FIELD 413@->DENCOM
  GROUP 1
END

STRING 9
BEGIN
  KEY "PROV. RESIDENZA"
  PROMPT 88 3 ""
  FIELD 413@->PROVCOM
END

STRING 101
BEGIN
  KEY "VIA RES."
  PROMPT 94 3 ""
  FIELD 216@->INDRES[1,30]
  FLAGS "H" 
  MESSAGE COPY,10
END

STRING 102
BEGIN
  KEY "NUM.CIV"
  PROMPT 93 3 ""
  FLAGS "H"
  FIELD 216@->CIVRES
  MESSAGE APPEND,10
END

STRING 10
BEGIN
  KEY "VIA RES. + numcivres"
  PROMPT 95 3 ""
  GROUP 1
END

STRING 11
BEGIN
  KEY "DESCR. CAUSALE"
  PROMPT 10 5 ""
  FIELD 14@->S0[1,20]
END

STRING 12
BEGIN
  KEY "FLAG C.T."
  PROMPT 34 5 ""
  FIELD 14@->B2
END

STRING 13
BEGIN
  KEY "FLAG T.S."
  PROMPT 39 5 ""
  FIELD 14@->B3
END

NUMBER 14
BEGIN
  KEY "AMMONTARE CORRISPOSTO"
  PROMPT 45 5 ""  
  PICTURE "###.###.###^^^"    
  MESSAGE ADD,FL->14
//  FIELD 61->TOTALE
END

NUMBER 15
BEGIN
  KEY "CONTRIBUTI S.S.N."
  PROMPT 60 5 ""    
  PICTURE "###.###.###^^^"  
  MESSAGE ADD,FL->15
//  FIELD 61->CONTSSN         
END

NUMBER 16
BEGIN
  KEY "SOMME NON SOGGETTE A RITENUTA"
  PROMPT 76 5 ""    
  PICTURE "###.###.###^^^"    
  MESSAGE ADD,FL->16
//  FIELD 61->SOMME    
END

NUMBER 17
BEGIN
  KEY "IMPONIBILE"
  PROMPT 91 5 ""  
  PICTURE "###.###.###^^^"    
  MESSAGE ADD,FL->17
//  FIELD 61->IMPONIBILE
END

NUMBER 18
BEGIN
  KEY "RITENUTE OPERATE"
  PROMPT 105 5 ""  
  PICTURE "###.###.###^^^"   
  MESSAGE ADD,FL->18
//  FIELD 61->RITENUTE       
END

NUMBER 19
BEGIN
  KEY "NETTO CORRISPOSTO"
  PROMPT 120 5 ""  
  PICTURE "###.###.###^^^"   
  MESSAGE ADD,FL->19
//  FIELD 61->NETTO         
END

END

SECTION FOOTER LAST 5

NUMBER 14
BEGIN
  KEY "TOTALE AMMONTARE CORRISPOSTO"
  PROMPT 45 1 ""            
  PICTURE "###.###.###^^^"    
END

NUMBER 15
BEGIN
  KEY "TOTALE CONTRIBUTI S.S.N."
  PROMPT 61 1 ""            
  PICTURE "###.###.###^^^"    
END

NUMBER 16
BEGIN
  KEY "TOTALE SOMME NON SOGGETTE A RITENUTA"
  PROMPT 76 1 ""            
  PICTURE "###.###.###^^^"    
END

NUMBER 17
BEGIN
  KEY "TOTALE IMPONIBILE"
  PROMPT 91 1 ""            
  PICTURE "###.###.###^^^"    
END

NUMBER 18
BEGIN
  KEY "TOTALE RITENUTE OPERATE"
  PROMPT 105 1 ""           
  PICTURE "###.###.###^^^"    
END
                              
NUMBER 19
BEGIN
  KEY "TOTALE NETTO CORRISPOSTO"
  PROMPT 120 1 ""           
  PICTURE "###.###.###^^^"    
END

STRINGA 2
BEGIN
 KEY "FIRMA"
 PROMPT 83 5 ""
 FIELD 116@->RAGSOC        
END
                              
END
