7 messaggi dal 18 agosto 2006
Ciao a tutti ho il seguente problema:

ho realizzato un programma per la gestione dei documenti di trasporto e le fatture per una lavanderia e tutto mi funziona bene se nel calcolo totale degli articoli presenti nei documenti di trasporto sono sempre nello stesso ordine però, molto spesso, a volte ci sono cose nuove oppure mancano di conseguenza non mi tornano i conti totali degli articoli.

Faccio un es. così vi è più chiaro:

ddt1:

10 camicie
3 mutande
2 reggiseni

ddt2:

5 mutande
1 reggiseno

al posto di sommarmi 10camicie, 8 mutande, 3 reggiseni mi fa: 3 + cinque mutande mi fa 15 camicie e 4 mutande e 2 reggiseni.

Come posso ovviare a questo problema?
635 messaggi dal 06 settembre 2002
Ciao,
che istruzione utilizzi per effettuare la somma?

Fai la somma da script o direttamente da recordset?

Ciao

OJD
7 messaggi dal 18 agosto 2006
ti posto tutto il codice della pagina così ti rendi conto di come ho strutturato il lavoro.

<!--#include file="protezione.asp"-->
<title>Fattura</title>
<body bgcolor="#CCCCCC" text="#000000">
<script language="JavaScript">

//configure refresh interval (in seconds)
var countDownInterval=40;
//configure width of displayed text, in px (applicable only in NS4)
var c_reloadwidth=200

</script>

<ilayer id="c_reload" width=&{c_reloadwidth}; ><layer id="c_reload2" width=&{c_reloadwidth}; left=0 top=0></layer></ilayer>

<script>

var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location.reload()
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){ //CHANGE TEXT BELOW TO YOUR OWN
document.c_reload.document.c_reload2.document.write('Next <a href="javascript:window.location.reload()">refresh</a> in <b id="countDownText">'+countDownTime+' </b> seconds')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}

function startit(){
if (document.all||document.getElementById) //CHANGE TEXT BELOW TO YOUR OWN
document.write('Prossimo <a href="javascript:window.location.reload()">aggiornamento</a> in <b id="countDownText">'+countDownTime+' </b> secondi')
countDown()
}

if (document.all||document.getElementById)
startit()
else
window.onload=startit

</script>
<table width="1034" border="0" height="205">
<tr>
<td>
<p>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM dati_esercizio"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
</p>
<table width="1032" border="0">
<tr>
<td colspan="20">
<p align="center"><b><em><b><%=rs(1)%> di: <em><b><%=rs(2)%><br>
</b></em></b></em></b><b>Res: <em><b><%=rs(3)%></b></em> - <em><b><%=rs(4)%><br>
</b></em></b><b><em><b>Part. I.V.A.: <%=rs(5)%><br>
</b></em></b><b>Cod. Fisc: <em><b><%=rs(6)%></b></em><br>
Ubic. Es.<em><b> <%=rs(7)%></b></em> <em></em> Via: <em><b><em><b><%=rs(8)%></b></em><br>
</b></em></b><b>Luogo Conservazione Documenti Fiscali:<br>
</b><b><em><b><em><b><%=rs(9)%></b></em></b></em> - Via <em><b><em><b><%=rs(10)%></b></em><br>
</b></em></b><b><em><b><%=rs(11)%></b></em></b> <b><em><b> <%=rs(12)%></b></em>
<em><b><%=rs(13)%></b></em> <em><b><%=rs(14)%></b></em></b></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>

<!--#include file="inc_conn.asp"-->
<!--#include file="inc_funzioni.asp"-->
<%
' Definizione della variabile
dim anno, numero, dataInizio, dataFine
anno =request("anno")
numero=request("numero")
dataInizio=request("dataInizio")
dataFine=request("dataFine")

call Update_Num(anno, numero, intAdminNamberID)
dim stranno
stranno = request.form("anno")
dim strnumero
strnumero = request.form("numero")
dim stresercizio
stresercizio = request.form("esercizio")
dim strnome_esercizio
strnome_esercizio = request.form("nome_esercizio")
dim strcognome_titolare
strcognome_titolare = request.form("cognome_titolare")
dim strnome1_titolare
strnome1_titolare = request.form("nome1_titolare")
dim strnome2_titolare
strnome2_titolare = request.form("nome2_titolare")
dim strvia
strvia = request.form("via")
dim strcitta
strcitta = request.form("citta")
dim strcap
strcap = request.form("cap")
dim strprovincia
strprovincia = request.form("provincia")
dim strpiva
strpiva = request.form("piva")
dim strcodfisc
strcodfisc = request.form("codfisc")
dim strdata
strdata = request.form("data")
dim strdataInizio
strdataInizio = request.form("dataInizio")
dim strdataFine
strdataFine = request.form("dataFine")
dim strs1
strs1 = request.form("s1")
dim strs2
strs2 = request.form("s2")
dim strs3
strs3 = request.form("s3")
dim strs4
strs4 = request.form("s4")
dim strs5
strs5 = request.form("s5")
dim strs6
strs6 = request.form("s6")
dim strs7
strs7 = request.form("s7")
dim strs8
strs8 = request.form("s8")
dim strs9
strs9 = request.form("s9")
dim strs10
strs10 = request.form("s10")
dim strs11
strs11 = request.form("s11")
dim strs12
strs12 = request.form("s12")
dim strs13
strs13 = request.form("s13")
dim strs14
strs14 = request.form("s14")
dim strs15
strs15 = request.form("s15")
dim strs16
strs16 = request.form("s16")
dim strs17
strs17 = request.form("s17")
dim strs18
strs18 = request.form("s18")
dim strs19
strs19 = request.form("s19")
dim strs20
strs20 = request.form("s20")
dim strt1
strst1 = request.form("t1")
dim strt2
strst2 = request.form("t2")
dim strt3
strst3 = request.form("t3")
dim strt4
strst4 = request.form("t4")
dim strt5
strst5 = request.form("t5")
dim strt6
strst6 = request.form("t6")
dim strt7
strst7 = request.form("t7")
dim strt8
strst8 = request.form("t8")
dim strt9
strst9 = request.form("t9")
dim strt10
strst10 = request.form("t10")
dim strt11
strst11 = request.form("t11")
dim strt12
strst12 = request.form("t12")
dim strq13
strst13 = request.form("t13")
dim strt14
strst14 = request.form("t14")
dim strt15
strst15 = request.form("t15")
dim strt16
strst16 = request.form("t16")
dim strt17
strst17 = request.form("t17")
dim strt18
strst18 = request.form("t18")
dim strt19
strst19 = request.form("t19")
dim strt20
strst20 = request.form("t20")
dim straliquota
straliquota = request.form("aliquota")
dim strimponibile
strimponibile = request.form("imponibile")
dim strimposta
strimposta = request.form("imposta")
dim strtot_fattura
strtot_fattura = request.form("tot_fattura")
dim strddt
strddt = request.form("ddt")
dim strtot1
strtot1 = request.form("tot1")
dim strtot2
strtot2 = request.form("tot2")
dim strtot3
strtot3 = request.form("tot3")
dim strtot4
strt4 = request.form("tot4")
dim strtot5
strtot5 = request.form("tot5")
dim strtot6
strtot6 = request.form("tot6")
dim strtot7
strtot7 = request.form("tot7")
dim strtot8
strtot8 = request.form("tot8")
dim strtot9
strtot9 = request.form("tot9")
dim strtot10
strtot10 = request.form("tot10")
dim strtot11
strtot11 = request.form("tot11")
dim strtot12
strtot12 = request.form("tot12")
dim strtot13
strtot13 = request.form("tot13")
dim strtot14
strtot14 = request.form("tot14")
dim strtot15
strtot15 = request.form("tot15")
dim strtot16
strtot16 = request.form("tot16")
dim strtot17
strtot17 = request.form("tot17")
dim strtot18
strtot18 = request.form("tot18")
dim strtot19
strtot19 = request.form("tot19")
dim strtot20
strtot20 = request.form("tot20")
strCode="innovatel"

' Mappaggio del database
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn

' Stringa di interrogazione sulla tabella libri
sql = "SELECT * FROM fattura"

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3

' Preparazione e scrittura nuovo record
rs.addnew
rs(1) = strnumero
rs(2) = stranno
rs(3) = stresercizio
rs(4) = strnome_esercizio
rs(5) =strcognome_titolare
rs(6) =strnome1_titolare
rs(7) =strnome2_titolare
rs(8) =strvia
rs(9) =strcitta
rs(10) =strcap
rs(11) =strprovincia
rs(12) =strpiva
rs(13) =strcodfisc
rs(14) =strdata
rs(15) =strdataInizio
rs(16) =strdataFine
rs(17) =strs1
rs(18) =strs2
rs(19) =strs3
rs(20) =strs4
rs(21) =strs5
rs(22) =strs6
rs(23) =strs7
rs(24) =strs8
rs(25) =strs9
rs(26) =strs10
rs(27) =strs11
rs(28) =strs12
rs(29) =strs13
rs(30) =strs14
rs(31) =strs15
rs(32) =strs16
rs(33) =strs17
rs(34) =strs18
rs(35) =strs19
rs(36) =strs20
rs(37) =strt1
rs(38) =strt2
rs(39) =strt3
rs(40) =strt4
rs(41) =strt5
rs(42) =strt6
rs(43) =strt7
rs(44) =strt8
rs(45) =strt9
rs(46) =strt10
rs(47) =strt11
rs(48) =strt12
rs(49) =strt13
rs(50) =strt14
rs(51) =strt15
rs(52) =strt16
rs(53) =strt17
rs(54) =strt18
rs(55) =strt19
rs(56) =strt20
rs(57) =straliquota
rs(58) =strimponibile
rs(59) =strimposta
rs(60) =strtot_fattura
rs(61) =strddt
rs(62) =strtot1
rs(63) =strtot2
rs(64) =strtot3
rs(65) =strtot4
rs(66) =strtot5
rs(67) =strtot6
rs(68) =strtot7
rs(69) =strtot8
rs(70) =strtot9
rs(71) =strtot10
rs(72) =strtot11
rs(73) =strtot12
rs(74) =strtot13
rs(75) =strtot14
rs(76) =strtot15
rs(77) =strtot16
rs(78) =strtot17
rs(79) =strtot18
rs(80) =strtot19
rs(81) =strtot20
%>
<%
ID=request("fornitori")

sql = "SELECT * FROM anag_esercizio WHERE ID="& ID
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
</p>
<form name="form1" method="post" action="pagina2.asp">
<table width="1034" border="0">
<tr>
<td>
<p align="center"><b><font color="#009900" size="4">DATI DELL'ESERCIZIO
PER IL QUALE SI EMETTE FATTURA:</font></b> </p>
<p align="center"><font size="3" color="#000000">Tipo di Esercizio:</font><em><b>
</b></em><b><font size="4" color="#009900"><em><b>
<input type="text" name="esercizio" value="<%=rs(1)%>">
</b></em></font></b>, Nome Esercizio:<b> <em><b>
<input type="text" name="nome_esercizio" value="<%=rs(2)%>">
;</b></em></b></p>
<p align="center">Cognome Titolare :<b> <em><b>
<input type="text" name="cognome_titolare" value="<%=rs(3)%>">
</b></em> , </b>Nome Titolare,
<input type="text" name="nome1_titolare" value="<%=rs(4)%>">
<em></em> Secondo Nome: <b><em>
<input type="text" name="nome2_titolare" value="<%=rs(5)%>">
;</em></b></p>
<p align="center"><em>Codice Fiscale:
<input type="text" name="codfisc" value="<%=rs(11)%>">
P.Iva Esercizio:
<input type="text" name="piva" value="<%=rs(10)%>">
</em></p>
<p align="center"> Citta:<b> <em>
<input type="text" name="citta" value="<%=rs(7)%>">
</em> , </b>Via:<b> <em>
<input type="text" name="via" value="<%=rs(6)%>">
</em> ,</b></p>
<p align="center">C.A.P.: <b><em></em></b><em><b><em> <b><em>
<input type="text" name="cap" value="<%=rs(9)%>">
</em></b></em></b>, Provincia:</em><b><em> <b><em>
<input type="text" name="provincia" value="<%=rs(8)%>">
</em></b></em></b></p>
</td>
</tr>
</table>
<br>
<table width="1034" border="0">
<tr>
<td>
<div align="center">
<p><b><font color="#CC3300" size="4">DATI DELLA FATTUA:</font></b></p>
<p><b><font size="3" color="#000000">Numero Fattura:</font></b>
<input type="text" name="numero" value="<%=response.write (numero)%>">
<b>, Anno:
<input type="text" name="anno" value="<%=response.write (anno)%>">
</b></p>
<p><b>Periodo di Fatturazione: dal</b>
<input type="text" name="dataInizio" value="<%=response.write (dataInizio)%>">
<b>al:</b>
<input type="text" name="dataFine" value="<%=response.write (dataFine)%>">
</p>
<p><b>Data Emissione Fattura:
<input type="text" name="data">
(gg/mm/aaaa)</b></p>
</div>
</td>
</tr>
</table>
<br>
<table width="1034" border="0">
<tr>
<td>
<div align="left">
<p align="center"></p>
</div>
<div align="center"> <font size="4"><b><font color="#330099">DATI PROVENIENTI
DAI DOCUMENTI DI TRASPORTO EMESSI:</font></b></font></div>
</td>
</tr>
</table>
<br>
<table border="1" width="1034" bordercolor="#000000">
<tr bgcolor="#FF9966">
<td width="19" bgcolor="#CCCCCC" bordercolor="#CCCCCC">&nbsp;</td>
<td width="66" bgcolor="#FFCCCC">
<div align="center"><b><font color="#000000">Articoli <br>
1-5:</font> </b></div>
</td>
<td width="81" bgcolor="#FFCCCC">
<div align="center"><b><font color="#000000">Quantit&agrave;:</font> </b></div>
</td>
<td width="59" bgcolor="#FFCCCC">
<div align="center"><b><font color="#000000">Prezzo &euro;:</font> </b></div>
</td>
<td width="26" bgcolor="#CCCCCC" bordercolor="#CCCCCC">&nbsp;</td>
<td width="66" bgcolor="#FF9966">
<div align="center"><b><font color="#000000">Articoli <br>
6-10:</font> </b></div>
</td>
<td width="81" bgcolor="#FF9966">
<div align="center"><b><font color="#000000">Quantit&agrave;:</font> </b></div>
</td>
<td width="59" bgcolor="#FF9966">
<div align="center"><b><font color="#000000">Prezzo &euro;:</font> </b></div>
</td>
<td width="23" bgcolor="#CCCCCC" bordercolor="#CCCCCC">&nbsp;</td>
<td width="94" bgcolor="#FFCCCC">
<div align="center"><b><font color="#000000">Articoli <br>
11-15:</font> </b></div>
</td>
<td width="73" bgcolor="#FFCCCC">
<div align="center"><b><font color="#000000">Quantit&agrave;:</font></b></div>
</td>
<td width="57" bgcolor="#FFCCCC">
<div align="center"><b><font color="#000000">Prezzo &euro;:</font></b></div>
</td>
<td width="20" bgcolor="#CCCCCC" bordercolor="#CCCCCC">&nbsp;</td>
<td width="69" bgcolor="#FF9966">
<div align="center"><b><font color="#000000">Articolo 16-20:</font> </b></div>
</td>
<td width="76" bgcolor="#FF9966">
<div align="center"><b><font color="#000000">Quantit&agrave;:</font></b></div>
</td>
<td width="65" bgcolor="#FF9966">
<div align="center"><b><font color="#000000">Prezzo &euro;:</font></b></div>
</td>
<%
Dim rsReport__MMColParam
rsReport__MMColParam = "1"
If (Request.QueryString("data") <> "") Then
rsReport__MMColParam = Request.QueryString("data")
End If
%>
<%
dataInizio = month(Request.QueryString("dataInizio")) & "/" & day(Request.QueryString("dataInizio")) & "/" & year(Request.QueryString("dataInizio"))
dataFine = month(Request.QueryString("dataFine")) & "/" & day(Request.QueryString("dataFine")) & "/" & year(Request.QueryString("dataFine"))

dim totale
totale = 0

Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "' ORDER BY esercizio ASC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3



do while not(rs.eof)
if intVolta="1" then
intVolta="0"
intTesto="#000000"
intSfondo="#ffccff"
else
totale = totale + rs(36)
intVolta="1"
intTesto="#000000"
intSfondo="#ccccff"
end if


%>
<tr bgcolor="#CCCCCC" bordercolor="#CCCCCC">
<td width="19">&nbsp;</td>
<td colspan="15">
<div align="center"><b>Documento di Trasporto numero:
<input type="text" name="ddt" value="<%=rs(2)%> \ <%=rs(1)%>">
<span class="Stile2"><b><font color="#000000"> <a href="../ddt/Modifica1.asp" target="_blank">Modifica
D.d.T.</a></font></b></span></b></div>
</td>
<tr bgcolor="<%=intSfondo%>">
<td width="19">
<div align="center"><b>1</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s1")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q1")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p1")%></b></div>
</td>
<td width="26">
<div align="center"><b>6</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s6")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q6")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p6")%></b></div>
</td>
<td width="23">
<div align="center"><b>11</b></div>
</td>
<td width="94">
<div align="center"><b><%=rs("s11")%></b></div>
</td>
<td width="73">
<div align="center"><b><%=rs("q11")%></b></div>
</td>
<td width="57">
<div align="center"><b><%=rs("p11")%></b></div>
</td>
<td width="20">
<div align="center"><b>16</b></div>
</td>
<td width="69">
<div align="center"><b><%=rs("s16")%></b></div>
</td>
<td width="76">
<div align="center"><b><%=rs("q16")%></b></div>
</td>
<td width="65">
<div align="center"><b><%=rs("p16")%></b></div>
</td>
</tr>
<tr bgcolor="<%=intSfondo%>">
<td width="19">
<div align="center"><b>2</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s2")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q2")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p2")%></b></div>
</td>
<td width="26">
<div align="center"><b>7</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s7")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q7")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p7")%></b></div>
</td>
<td width="23">
<div align="center"><b>12</b></div>
</td>
<td width="94">
<div align="center"><b><%=rs("s12")%></b></div>
</td>
<td width="73">
<div align="center"><b><%=rs("q12")%></b></div>
</td>
<td width="57">
<div align="center"><b><%=rs("p12")%></b></div>
</td>
<td width="20">
<div align="center"><b>17</b></div>
</td>
<td width="69">
<div align="center"><b><%=rs("s17")%></b></div>
</td>
<td width="76">
<div align="center"><b><%=rs("q17")%></b></div>
</td>
<td width="65">
<div align="center"><b><%=rs("p17")%></b></div>
</td>
</tr>
<tr bgcolor="<%=intSfondo%>">
<td width="19">
<div align="center"><b>3</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s3")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q3")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p3")%></b></div>
</td>
<td width="26">
<div align="center"><b>8</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s8")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q8")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p8")%></b></div>
</td>
<td width="23">
<div align="center"><b>13</b></div>
</td>
<td width="94">
<div align="center"><b><%=rs("s13")%></b></div>
</td>
<td width="73">
<div align="center"><b><%=rs("q13")%></b></div>
</td>
<td width="57">
<div align="center"><b><%=rs("p13")%></b></div>
</td>
<td width="20">
<div align="center"><b>18</b></div>
</td>
<td width="69">
<div align="center"><b><%=rs("s18")%></b></div>
</td>
<td width="76">
<div align="center"><b><%=rs("q18")%></b></div>
</td>
<td width="65">
<div align="center"><b><%=rs("p18")%></b></div>
</td>
</tr>
<tr bgcolor="<%=intSfondo%>">
<td width="19">
<div align="center"><b>4</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s4")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q4")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p4")%></b></div>
</td>
<td width="26">
<div align="center"><b>9</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s9")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q9")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p9")%></b></div>
</td>
<td width="23">
<div align="center"><b>14</b></div>
</td>
<td width="94">
<div align="center"><b><%=rs("s14")%></b></div>
</td>
<td width="73">
<div align="center"><b><%=rs("q14")%></b></div>
</td>
<td width="57">
<div align="center"><b><%=rs("p14")%></b></div>
</td>
<td width="20">
<div align="center"><b>19</b></div>
</td>
<td width="69">
<div align="center"><b><%=rs("s19")%></b></div>
</td>
<td width="76">
<div align="center"><b><%=rs("q19")%></b></div>
</td>
<td width="65">
<div align="center"><b><%=rs("p19")%></b></div>
</td>
</tr>
<tr bgcolor="<%=intSfondo%>">
<td width="19">
<div align="center"><b>5</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s5")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q5")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p5")%></b></div>
</td>
<td width="26">
<div align="center"><b>10</b></div>
</td>
<td width="66">
<div align="center"><b><%=rs("s10")%></b></div>
</td>
<td width="81">
<div align="center"><b><%=rs("q10")%></b></div>
</td>
<td width="59">
<div align="center"><b><%=rs("p10")%></b></div>
</td>
<td width="23">
<div align="center"><b>15</b></div>
</td>
<td width="94">
<div align="center"><b><%=rs("s15")%></b></div>
</td>
<td width="73">
<div align="center"><b><%=rs("q15")%></b></div>
</td>
<td width="57">
<div align="center"><b><%=rs("p15")%></b></div>
</td>
<td width="20">
<div align="center"><b>20</b></div>
</td>
<td width="69">
<div align="center"><b><%=rs("s20")%></b></div>
</td>
<td width="76">
<div align="center"><b><%=rs("q20")%></b></div>
</td>
<td width="65">
<div align="center"><b><%=rs("p20")%></b></div>
</td>
</tr>
<%
rs.movenext
loop
rs.Close
set rs = Nothing
conn.Close
set conn = Nothing
%>
</table>
<br>
<table width="1034" border="0">
<tr>
<td height="26">
<div align="left">
<p align="center"></p>
</div>
<div align="center"> <font size="4" color="#FF00CC"><b><font color="#993399">RIEPILOGO
TOTALE DEGLI ELEMENTI DA FATTURARE DI TUTTI I D.d.t.:</font></b></font></div>
</td>
</tr>
</table>
<br>
<table width="1034" border="1" bordercolor="#000000">
<tr>
<td width="27" height="30" bordercolor="#CCCCCC">&nbsp;</td>
<td width="142" bgcolor="#FF9966" height="30">
<div align="center"><b>Articolo:</b></div>
</td>
<td width="136" bgcolor="#FF9966" height="30">
<div align="center"><b>Num.Tot. Pezzi:</b></div>
</td>
<td width="136" bgcolor="#FF9966" height="30">
<div align="center"><b>Prezzo Tot. Art.li &euro;:</b></div>
</td>
<td width="18" height="30" bordercolor="#CCCCCC">&nbsp;</td>
<td width="148" bgcolor="#FF9966" height="30">
<div align="center"><b>Articolo:</b></div>
</td>
<td width="136" bgcolor="#FF9966" height="30">
<div align="center"><b>Quantit&agrave; Totale:</b></div>
</td>
<td width="109" bgcolor="#FF9966" height="30">
<div align="center"><b>Prezzo Tot. Art.li &euro;:</b></div>
</td>
</tr>
<tr>
<td width="27">
<div align="center"><b>1</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s1" value="<%=rs(15)%>">
</b></div>
</td>
<td width="136"> <b>
<%
Dim mdb
mdb = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql
str_sql = "select sum(q1) as totale from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql)
%>
<input type="text" name="t1" value="<%=rs("totale")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdba
mdba = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conna
Set conna = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conna.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqla
str_sqla = "select sum(t1) as totalea from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqla)
%>
<input type="text" name="tot1" value="<%=rs("totalea")%>">
</b></td>
<td width="18">
<div align="center"><b>11</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s11" value="<%=rs(25)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb11
mdb11 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn11
Set conn11 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn11.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql11
str_sql11 = "select sum(q11) as totale11 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql11)
%>
<input type="text" name="t11" value="<%=rs("totale11")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbm
mdbm = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connm
Set connm = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connm.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlm
str_sqlm = "select sum(t11) as totalem from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlm)
%>
<input type="text" name="tot11" value="<%=rs("totalem")%>">
</b></td>
</tr>
<tr>
<td width="27">
<div align="center"><b>2</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s2" value="<%=rs(16)%>">
</b></div>
</td>
<td width="136"> <b>
<%
Dim mdb2
mdb2 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn2
Set conn2 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn2.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql2
str_sql2 = "select sum(q2) as totale2 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql2)
%>
<input type="text" name="t2" value="<%=rs("totale2")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbb
mdbb = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connb
Set connb = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connb.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlb
str_sqlb = "select sum(t2) as totaleb from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlb)
%>
<input type="text" name="tot2" value="<%=rs("totaleb")%>">
</b></td>
<td width="18">
<div align="center"><b>12</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s12" value="<%=rs(26)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb12
mdb12 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn12
Set conn12 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn12.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql12
str_sql12 = "select sum(q12) as totale12 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql12)
%>
<input type="text" name="t12" value="<%=rs("totale12")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbn
mdbn = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connn
Set connn = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqln
str_sqln = "select sum(t12) as totalen from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqln)
%>
<input type="text" name="tot12" value="<%=rs("totalen")%>">
</b></td>
</tr>
<tr>
<td width="27">
<div align="center"><b>3</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s3" value="<%=rs(17)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb3
mdb3 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn3
Set conn3 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn3.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql3
str_sql3 = "select sum(q3) as totale3 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql3)
%>
<input type="text" name="t3" value="<%=rs("totale3")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbc
mdbc = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connc
Set connc = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connc.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlc
str_sqlc = "select sum(t3) as totalec from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlc)
%>
<input type="text" name="tot3" value="<%=rs("totalec")%>">
</b></td>
<td width="18">
<div align="center"><b>13</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s13" value="<%=rs(27)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb13
mdb13 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn13
Set conn13 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn13.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql13
str_sql13 = "select sum(q13) as totale13 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql13)
%>
<input type="text" name="t13" value="<%=rs("totale13")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbo
mdbo = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conno
Set conno = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conno.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlo
str_sqlo = "select sum(t13) as totaleo from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlo)
%>
<input type="text" name="tot13" value="<%=rs("totaleo")%>">
</b></td>
</tr>
<tr>
<td width="27">
<div align="center"><b>4</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s4" value="<%=rs(18)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb4
mdb4 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn4
Set conn4 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn4.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql4
str_sql4 = "select sum(q4) as totale4 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql4)
%>
<input type="text" name="t4" value="<%=rs("totale4")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbd
mdbd = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connd
Set connd = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connd.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqld
str_sqld = "select sum(t4) as totaled from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqld)
%>
<input type="text" name="tot4" value="<%=rs("totaled")%>">
</b></td>
<td width="18">
<div align="center"><b>14</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s14" value="<%=rs(28)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb14
mdb14 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn14
Set conn14 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn14.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql14
str_sql14 = "select sum(q14) as totale14 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql14)
%>
<input type="text" name="t14" value="<%=rs("totale14")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbp
mdbp = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connp
Set connp = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connp.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlp
str_sqlp = "select sum(t14) as totalep from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlp)
%>
<input type="text" name="tot14" value="<%=rs("totalep")%>">
</b></td>
</tr>
<tr>
<td width="27">
<div align="center"><b>5</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s5" value="<%=rs(19)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb5
mdb5 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn5
Set conn5 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn5.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql5
str_sql5 = "select sum(q5) as totale5 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql5)
%>
<input type="text" name="t5" value="<%=rs("totale5")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbe
mdbe = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conne
Set conne = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conne.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqle
str_sqle = "select sum(t5) as totalee from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqle)
%>
<input type="text" name="tot5" value="<%=rs("totalee")%>">
</b></td>
<td width="18">
<div align="center"><b>15</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s15" value="<%=rs(29)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb15
mdb15 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn15
Set conn15 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn15.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql15
str_sql15 = "select sum(q15) as totale15 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql15)
%>
<input type="text" name="t15" value="<%=rs("totale15")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbq
mdbq = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connq
Set connq = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connq.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlq
str_sqlq = "select sum(t15) as totaleq from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlq)
%>
<input type="text" name="tot15" value="<%=rs("totaleq")%>">
</b></td>
</tr>
<tr>
<td width="27">
<div align="center"><b>6</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s6" value="<%=rs(20)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb6
mdb6 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn6
Set conn6 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn6.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql6
str_sql6 = "select sum(q6) as totale6 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql6)
%>
<input type="text" name="t6" value="<%=rs("totale6")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbf
mdbf = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connf
Set connf = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connf.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlf
str_sqlf = "select sum(t6) as totalef from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlf)
%>
<input type="text" name="tot6" value="<%=rs("totalef")%>">
</b></td>
<td width="18">
<div align="center"><b>16</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s16" value="<%=rs(30)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb16
mdb16 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn16
Set conn16 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn16.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql16
str_sql16 = "select sum(q16) as totale16 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql16)
%>
<input type="text" name="t16" value="<%=rs("totale16")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbr
mdbr = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connr
Set connr = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connr.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlr
str_sqlr = "select sum(t16) as totaler from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlr)
%>
<input type="text" name="tot16" value="<%=rs("totaler")%>">
</b></td>
</tr>
<tr>
<td width="27">
<div align="center"><b>7</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s7" value="<%=rs(21)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb7
mdb7 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn7
Set conn7 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn7.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql7
str_sql7 = "select sum(q7) as totale7 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql7)
%>
<input type="text" name="t7" value="<%=rs("totale7")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbg
mdbg = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conng
Set conng = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conng.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlg
str_sqlg = "select sum(t7) as totaleg from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlg)
%>
<input type="text" name="tot7" value="<%=rs("totaleg")%>">
</b></td>
<td width="18">
<div align="center"><b>17</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s17" value="<%=rs(31)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb17
mdb17 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn17
Set conn17 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn17.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql17
str_sql17 = "select sum(q17) as totale17 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql17)
%>
<input type="text" name="t17" value="<%=rs("totale17")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbs
mdbs = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conns
Set conns = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conns.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqls
str_sqls = "select sum(t17) as totales from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqls)
%>
<input type="text" name="tot17" value="<%=rs("totales")%>">
</b></td>
</tr>
<tr>
<td width="27">
<div align="center"><b>8</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s8" value="<%=rs(22)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb8
mdb8 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn8
Set conn8 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn8.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql8
str_sql8 = "select sum(q8) as totale8 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql8)
%>
<input type="text" name="t8" value="<%=rs("totale8")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbh
mdbh = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connh
Set connh = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connh.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlh
str_sqlh = "select sum(t8) as totaleh from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlh)
%>
<input type="text" name="tot8" value="<%=rs("totaleh")%>">
</b></td>
<td width="18">
<div align="center"><b>18</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s18" value="<%=rs(32)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb18
mdb18 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn18
Set conn18 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn18.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql18
str_sql18 = "select sum(q18) as totale18 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql18)
%>
<input type="text" name="t18" value="<%=rs("totale18")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbt
mdbt = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connt
Set connt = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connt.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlt
str_sqlt = "select sum(t18) as totalet from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlt)
%>
<input type="text" name="tot18" value="<%=rs("totalet")%>">
</b></td>
</tr>
<tr>
<td width="27">
<div align="center"><b>9</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s9" value="<%=rs(23)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb9
mdb9 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn9
Set conn9 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn9.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql9
str_sql9 = "select sum(q9) as totale9 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql9)
%>
<input type="text" name="t9" value="<%=rs("totale9")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbi
mdbi = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conni
Set conni = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conni.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqli
str_sqli = "select sum(t9) as totalei from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqli)
%>
<input type="text" name="tot9" value="<%=rs("totalei")%>">
</b></td>
<td width="18">
<div align="center"><b>19</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s19" value="<%=rs(33)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb19
mdb19 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn19
Set conn19 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn19.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql19
str_sql19 = "select sum(q19) as totale19 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql19)
%>
<input type="text" name="t19" value="<%=rs("totale19")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbu
mdbu = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connu
Set connu = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connu.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlu
str_sqlu = "select sum(t19) as totaleu from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlu)
%>
<input type="text" name="tot19" value="<%=rs("totaleu")%>">
</b></td>
</tr>
<tr>
<td width="27">
<div align="center"><b>10</b></div>
</td>
<td width="142">
<div align="center"> <b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s10" value="<%=rs(24)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb10
mdb10 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn10
Set conn10 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn10.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql10
str_sql10 = "select sum(q10) as totale10 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql10)
%>
<input type="text" name="t10" value="<%=rs("totale10")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbl
mdbl = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connl
Set connl = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connl.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqll
str_sqll = "select sum(t10) as totalel from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqll)
%>
<input type="text" name="tot10" value="<%=rs("totalel")%>">
</b></td>
<td width="18">
<div align="center"><b>20</b></div>
</td>
<td width="148">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="s20" value="<%=rs(34)%>">
</b></div>
</td>
<td width="136"><b>
<%
Dim mdb20
mdb20 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn20
Set conn20 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn20.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql20
str_sql20 = "select sum(q20) as totale20 from ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql20)
%>
<input type="text" name="t20" value="<%=rs("totale20")%>">
</b></td>
<td width="136"> <b>
<%
Dim mdbv
mdbv = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim connv
Set connv = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
connv.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sqlv
str_sqlv = "select sum(t20) as totalev from calcolo_ddt WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sqlv)
%>
<input type="text" name="tot20" value="<%=rs("totalev")%>">
</b></td>
</tr>
</table>
<br>
<table width="1034" border="0">
<tr>
<td>
<div align="left">
<table width="506" border="1" align="center" bordercolor="#000000">
<tr bgcolor="#FFFFCC">
<td colspan="2">
<div align="right"><b>Aliquota: </b></div>
</td>
<td colspan="2">
<div align="center"><b>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("../Database/db.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
sql = "SELECT * FROM ddt WHERE nome_esercizio= '" &REQUEST("nome_esercizio")& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
%>
<input type="text" name="aliquota" value="<%=rs(75)%> %">
</b></div>
</td>
</tr>
<tr bordercolor="#CCCCCC">
<td colspan="4">&nbsp;</td>
</tr>
<tr bgcolor="#FFCCCC">
<td colspan="2">
<div align="right"><b>Imponibile &euro; :</b></div>
</td>
<td colspan="2">
<div align="center"><b>
<%
Dim mdb23
mdb23 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn23
Set conn23 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn23.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql23
str_sql23 = "select sum(totale_no_iva) as totale23 from calcolo_fattura WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql23)
%>
<input type="text" name="imponibile" value="<%=rs("totale23")%>">
&euro;</b></div>
</td>
</tr>
<tr bordercolor="#CCCCCC">
<td width="78">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="76">&nbsp;</td>
<td width="78">&nbsp;</td>
</tr>
<tr bgcolor="#CC99CC">
<td colspan="2">
<div align="right"><b>Imposta &euro;:</b></div>
</td>
<td colspan="2">
<div align="center"><b>
<%
Dim mdb21
mdb21 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn21
Set conn21 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn21.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql21
str_sql21 = "select sum(imponibile) as totale21 from calcolo_fattura WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql21)
%>
<input type="text" name="imposta" value="<%=rs("totale21")%>">
&euro;</b> </div>
</td>
</tr>
<tr bordercolor="#CCCCCC">
<td width="78">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="76">&nbsp;</td>
<td width="78">&nbsp;</td>
</tr>
<tr bgcolor="#9999FF">
<td colspan="2">
<div align="right"><b>Tot. Fattura &euro;:</b></div>
</td>
<td colspan="2">
<div align="center"><b>
<%
Dim mdb22
mdb22 = "../Database/db.mdb"

'creiamo l'oggetto Connection
Dim conn22
Set conn22 = Server.CreateObject("ADODB.Connection")

'apriamo la connessione
conn22.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(mdb)

'settiamo la nostra stringa SQL
Dim str_sql22
str_sql22 = "select sum(tot_fattura) as totale22 from calcolo_fattura WHERE (data BETWEEN #"&dataInizio&"# And #"&dataFine&"#) AND nome_esercizio= '" &REQUEST("nome_esercizio")& "'"

'creiamo l'oggetto RS
set rs = conn.execute(str_sql22)
%>
<input type="text" name="tot_fattura" value="<%=rs("totale22")%>">
&euro;</b></div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<p>&nbsp;
<table width="1034" border="0">
<tr>
<td>
<div align="left">
<p align="center"></p>
</div>
<div align="center">
<input type="submit" name="Submit" value="Invia">
<input type="reset" name="Submit2" value="Annulla">
<a href="javascript:;"onClick="javascript:window.close()">
<input type="button" name="Chiudi" value="Chiudi Pagina">
</a></div>
</td>
</tr>
</table>
<div align="left">
<p align="center"></p>
</div>
<div align="left"></div>
</form>


la prima parte è quella che richiama i dati per la fatturazione, la seconda è quella inerente ai documenti di trasporto, la terza è quella dove si fanno i calcoli mediante somma all'interno di una sql.

grazie mille per l'aiuto

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.