USE 65
JOIN %CA7 TO 65 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  65  ALIAS 216 INTO TIPOA=TIPOA CODANAGR=CODANAGR
JOIN  8 TO 216@ ALIAS 218 INTO CODANAGR=CODANAGR
JOIN 13 TO 216@ ALIAS 313 INTO COM=COMNASC
JOIN 13 TO 218@ ALIAS 413 INTO COM=COMRF(COMRES)
JOIN %STA TO 216@ ALIAS 24 INTO CODTAB=STATORES
END

DESCRIPTION
BEGIN
  65->* "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 28

STRINGA 1 
BEGIN
  KEY "CODICE FISCALE"
  PROMPT 4 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 58 11 ""
  FIELD 118@->SESSO
  GROUP 1
END  
  
STRINGA 6
BEGIN
  KEY "DATA DI NASCITA"
  PROMPT 66 11 ""
  FIELD 118@->DATANASC
  GROUP 1
END  
  
STRINGA 7
BEGIN
  KEY "COMUNE DI NASCITA"
  PROMPT 84 11 ""
  FIELD 113@->DENCOM
  GROUP 1
END  
  
STRINGA 8
BEGIN
  KEY "PROV. DI NASCITA"
  PROMPT 126 11 ""
  FIELD 113@->PROVCOM
  GROUP 1
END  
  
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 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 66 13  ""
  FIELD 116@->INDRF
END  
  
STRINGA 13
BEGIN
  KEY "NUM. CIVICO di RES."
  PROMPT 102 13 ""
  FIELD 116@->CIVRF
END  
  
STRINGA 14
BEGIN
  KEY "CAP"
  PROMPT 120 13 ""
  FIELD 116@->CAPRF
END  

STRINGA 15
BEGIN
  KEY "CODICE FISCALE DICHIARANTE"
  PROMPT 118 16  ""
END

NUMBER 16
BEGIN
  KEY "NUM. FOGLIO"
  PROMPT 123 20  ""
END

END

SECTION BODY ODD 8

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 2 ""
  FIELD 216@->COFI
END

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

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

STRING 102
BEGIN
  KEY "RAGSOC GIURIDICHE"
  PROMPT 54 2 ""
  FIELD 216@->RAGSOC
  GROUP 2
END

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

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

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

STRING 101
BEGIN
  KEY "COMUNE DI RESIDENZA GIURIDICHE"
  PROMPT 10 4 ""
  FIELD 413@->DENCOM
  GROUP 2
END

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

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

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

STRING 106
BEGIN
  KEY "PROV. RESIDENZA GIURIDICHE"
  PROMPT 61 4 ""
  FIELD 413@->PROVCOM
  GROUP 2
END

STRING 10
BEGIN
  KEY "VIA RES."
  PROMPT 94 4 ""
  FIELD 216@->INDRES[1,18]
  FLAGS "H"
  MESSAGE COPY,12|COPY,107
END

STRING 11
BEGIN
  KEY "NUM.CIV"
  PROMPT 93 4 ""
  FLAGS "H"
  FIELD 216@->CIVRES
  MESSAGE APPEND,12|APPEND,107
END

STRING 12
BEGIN
  KEY "VIA RES. + numcivres"
  PROMPT 95 4 ""
  GROUP 1
END

STRING 107
BEGIN
  KEY "VIA RES GIURIDICHE"
  PROMPT 69 4 ""
  GROUP 2
END

STRING 13
BEGIN
  KEY "FLAG I.C."
  PROMPT 129 4 ""
  FIELD 14@->B1
END

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

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

STRING 16
BEGIN
  KEY "CODICE STATO ESTERO DI RES."
  PROMPT 75 6 "" 
  FIELD 216@->STATORES
END

STRING 17
BEGIN
  KEY "CODICE FISCALE ESTERO"
  PROMPT 89 6 ""      
  FIELD 216@->COFIEST
END

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

STRING 19
BEGIN
  KEY "TOTALE"
  PROMPT 36 8 ""
  FIELD 65->TOTALE
  PICTURE "#########^^^"
END

STRING 20
BEGIN
  KEY "SOMME NON SOGGETTE A RITENUTA"
  PROMPT 55 8 ""
  FIELD 65->SOMME         
  PICTURE "#########^^^"  
END

STRING 21
BEGIN
  KEY "IMPONIBILE"
  PROMPT 75 8 ""
  FIELD 65->IMPONIBILE    
  PICTURE "#########^^^"  
END

STRING 22
BEGIN
  KEY "ALIQUOTA"
  PROMPT 88 8 ""
  FIELD 65->PERC
  PICTURE "###@@"
END

STRING 23
BEGIN
  KEY "IMPORTO"
  PROMPT 100 8 ""
  FIELD 65->IMPORTO       
  PICTURE "#########^^^"  
END

STRING 24
BEGIN
  KEY "NETTO"
  PROMPT 119 8 ""
  FIELD 65->NETTO         
  PICTURE "#########^^^"  
END

END

SECTION BODY EVEN 2

NUMBER 1
BEGIN
  KEY "TOTALE TOTALE"
  PROMPT 36 1 ""
END

NUMBER 2
BEGIN
  KEY "TOTALE SOMME NON SOGGETTE"
  PROMPT 55 1 ""
END

NUMBER 3
BEGIN
  KEY "TOTALE IMPONIBILE"
  PROMPT 75 1 ""
END

NUMBER 4
BEGIN
  KEY "TOTALE IMPORTO"
  PROMPT 101 1 ""
END

NUMBER 5
BEGIN
  KEY "TOTALE NETTO"
  PROMPT 120 1 ""
END

END
