USE 62
JOIN %CA7 TO 62 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  62  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 13 TO 216@ ALIAS 513 INTO STATO=""(STATORES) COM=COMRF(COMRES)
JOIN %STA TO 216@ ALIAS 24 INTO CODTAB=STATORES
END

DESCRIPTION
BEGIN
  62->* "Quadro D 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 10
  CA "X"           
  IN 3 2
  FI 131
END

SECTION HEADER FIRST 20

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

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

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

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

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

STRINGA 5
BEGIN
  KEY "SESSO"
  PROMPT 58 3 ""
  FIELD 118@->SESSO
  GROUP 1
END  
  
STRINGA 6
BEGIN
  KEY "DATA DI NASCITA"
  PROMPT 66 3 ""
  FIELD 118@->DATANASC
  GROUP 1
END  
  
STRINGA 7
BEGIN
  KEY "COMUNE DI NASCITA"
  PROMPT 84 3 ""
  FIELD 113@->DENCOM
  GROUP 1
END  
  
STRINGA 8
BEGIN
  KEY "PROV. DI NASCITA"
  PROMPT 126 3 ""
  FIELD 113@->PROVCOM
  GROUP 1
END  
  
STRINGA 10
BEGIN
  KEY "COMUNE DI RES.FISCALE"
  PROMPT 17 5 ""
  FIELD 213@->DENCOM
END  
  
STRINGA 11
BEGIN
  KEY "PROV DI RES.FISCALE"
  PROMPT 59 5 ""
  FIELD 213@->PROVCOM
END  
  
STRINGA 12
BEGIN
  KEY "VIA di RES."
  PROMPT 66 5  ""
  FIELD 116@->INDRF
  FIELD 116@->INDRES
END  
  
STRINGA 15
BEGIN
  KEY "NUM. CIVICO di RES."
  PROMPT 102 5 ""
  FIELD 116@->CIVRF 
  FIELD 116@->CIVRES
END  
  
STRINGA 16
BEGIN
  KEY "CAP"
  PROMPT 122 5 ""
  FIELD 116@->CAPRF 
  FIELD 116@->CAPRES
END  

STRINGA 13
BEGIN
  KEY "CODICE FISCALE DICHIARANTE"
  PROMPT 118 8  ""
END

NUMBER 14
BEGIN
  KEY "NUM. FOGLIO"
  PROMPT 123 11  ""
END

END

SECTION BODY ODD 8

LISTA 100
BEGIN
 KEY "Tipo anagrafica"
 FIELD 216@->TIPOA
 ITEM "F| " MESSAGE SHOW,1@|HIDE,2@
 ITEM "G| " MESSAGE SHOW,2@|HIDE,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 102
BEGIN
  KEY "RAGSOC GIURIDICHE"
  PROMPT 54 1 ""
  FIELD 216@->RAGSOC
  GROUP 2
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 FISICHE"
  PROMPT 53 3 ""
  FIELD 413@->DENCOM
  GROUP 1
END

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

STRING 101
BEGIN
  KEY "COMUNE RF/RES. GIURIDICHE"
  PROMPT 10 3 ""
  FIELD 513@->DENCOM
  GROUP 2
END

STRING 106
BEGIN
  KEY "PROV. RF/RES GIURIDICHE"
  PROMPT 63 3 ""
  FIELD 513@->PROVCOM
  GROUP 2
END

STRING 108
BEGIN
  KEY "VIA RES. FISICHE"
  FIELD 216@->INDRES[1,30]
  FLAGS "H"
  MESSAGE COPY,10 
  GROUP 1
END

STRING 109
BEGIN
  KEY "NUM.CIV DI RESIDENZA FISICHE"
  FLAGS "H"
  FIELD 216@->CIVRES
  MESSAGE APPEND,10     
  GROUP 1
END

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

STRING 110
BEGIN
  KEY "VIA RF/RES. GIURIDICHE"
  FIELD 216@->INDRF[1,50]
  FIELD 216@->INDRES[1,50]
  FLAGS "H"
  MESSAGE COPY,107 
  GROUP 2
END

STRING 111
BEGIN
  KEY "NUM.CIV RF/RES GIURIDICHE"
  FLAGS "H"   
  FIELD 216@->CIVRF
  FIELD 216@->CIVRES
  MESSAGE APPEND,107     
  GROUP 2
END

STRING 107
BEGIN
  KEY "VIA RES GIURIDICHE"
  PROMPT 71 3 ""
  GROUP 2
END

STRING 11
BEGIN
  KEY "FLAG DI NON RESIDENTE"
  PROMPT 12 5 ""
  FIELD 216@->SOGGNRES
END

STRING 12
BEGIN
  KEY "STATO ESTERO DI RES."
  PROMPT 16 5 "" 
  FIELD 24@->S0
END

STRING 13
BEGIN
  KEY "CODICE STATO ESTERO DI RES."
  PROMPT 79 5 "" 
  FIELD 216@->STATORES
END

STRING 14
BEGIN
  KEY "CODICE FISCALE ESTERO"
  PROMPT 91 5 ""      
  FIELD 216@->COFIEST
END

STRING 15
BEGIN
  KEY "DESCR. CAUSALE"
  PROMPT 12 7 ""
  FIELD 14@->S2
END

NUMBER 16
BEGIN
  KEY "TOTALE"
  PROMPT 26 7 ""
//  FIELD 62->TOTALE
  PICTURE "###.###.###^^^" 
  MESSAGE ADD,FL->16
END

NUMBER 17
BEGIN
  KEY "SOMME NON SOGGETTE A RITENUTA"
  PROMPT 47 7 ""
//  FIELD 62->SOMME         
  PICTURE "###.###.###^^^" 
  MESSAGE ADD,FL->17   
END

NUMBER 18
BEGIN
  KEY "IMPONIBILE"
  PROMPT 67 7 ""
//  FIELD 62->IMPONIBILE    
  PICTURE "###.###.###^^^" 
  MESSAGE ADD,FL->18   
END

STRING 19
BEGIN
  KEY "ALIQUOTA"
  PROMPT 84 7 ""
//  FIELD 62->PERC
//  PICTURE "##@,@@"
END

NUMBER 20
BEGIN
  KEY "IMPORTO"
  PROMPT 100 7 ""
//  FIELD 62->IMPORTO       
  PICTURE "###.###.###^^^"  
  MESSAGE ADD,FL->20  
END

NUMBER 21
BEGIN
  KEY "NETTO"
  PROMPT 120 7 ""
//  FIELD 62->NETTO         
  PICTURE "###.###.###^^^" 
  MESSAGE ADD,FL->21   
END

END

SECTION FOOTER LAST 5

NUMBER 16
BEGIN
  KEY "TOTALE TOTALE"
  PROMPT 26 1 ""           
  PICTURE "###.###.###^^^"   
END

NUMBER 17
BEGIN
  KEY "TOTALE SOMME NON SOGGETTE"
  PROMPT 47 1 ""   
  PICTURE "###.###.###^^^"   
END

NUMBER 18
BEGIN
  KEY "TOTALE IMPONIBILE"
  PROMPT 67 1 ""
  PICTURE "###.###.###^^^"   
END

NUMBER 20
BEGIN
  KEY "TOTALE IMPORTO"
  PROMPT 100 1 ""
  PICTURE "###.###.###^^^"   
END

NUMBER 21
BEGIN
  KEY "TOTALE NETTO"
  PROMPT 120 1 ""
  PICTURE "###.###.###^^^"   
END

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

END
