eccola, questa è la pagina che crea le ricevute per la successiva stampa su carta, grazie.
codice:
<%
Function FormatText(ByVal strMessage)
Dim word, m, k
strMessage = Split(strMessage,VbCrLf)
For m=0 To Ubound(strMessage)
word = Split(strMessage(m)," ")
For k = 0 To UBound(word)
If Mid(word(k),1,7) = "http://" Then
word(k) = "" & word(k) & ""
End If
If Mid(word(k),1,4) = "www." Then
word(k) = "" & word(k) & ""
End If
If (InStr(word(k),"@") <> 0) And (InStr(word(k),".") <> 0) Then
word(k) = "" & word(k) & ""
End If
Next
strMessage(m) = Join(word," ")
Next
strMessage = Join(strMessage,VbCrLf)
strMessage = Replace(strMessage, VbCrLf, "
")
FormatText = strMessage
End Function
%>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
SQL = "SELECT COUNT(*) FROM user"
sql = "SELECT * FROM user WHERE condominio = '" & request.form("condominio") & "' order by id asc"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
%>
<%
Dim strTesto
strTesto = rs.Fields("indirizzo")
%>
<%
If rs.EOF Then
%>
Nessun dato
<%
Else
rs.MoveFirst
i = request.form("numeroricevuta")
Do Until rs.EOF
%>
<table border="0" width="58%" id="table1" height="400">
<tr>
<td>
<div align="center">
<table border="1" width="711" id="table2" height="391" bordercolorlight="#000000" bordercolordark="#000000">
<tr>
<td width="258" height="93"><font face="Tahoma" size="2">
Condominio:
<%=rs.fields("condominio")%>
<%=FormatText(strTesto)%>
Cod. Fiscale: <%=rs.fields("codice_fiscale")%>
</font>
</td>
<td width="230" height="93">
<p align="center"><font face="Tahoma" size="2">
Amministrazione Condomini</font><font face="Tahoma" size="5">
Pingo Pallino
</font><font face="Tahoma" size="2">indirizzo
Tel 123456
email</font></td>
<td width="201" height="93"><font face="Tahoma" size="4">
Ricevuta n°</font><font face="Tahoma" size="4"> <%=i%></font>
<font face="Tahoma" size="2">Data: <%=request.form("data")%></font></td>
</tr>
<tr>
<td colspan="3" height="62"><font face="Tahoma" size="2">
Ricevuti dal <u>
<%
if rs.fields("titolo") = "RA" then
elseif rs.fields("titolo") = "RINA" then
%>
la
<%
else
end if
%>
</u>
Sig.<font face="Tahoma" size="4"><u> <%=rs.fields("nome")%> </u></font> -
<font face="Tahoma" size="2">
Scala:<font face="Tahoma" size="4"> <u><%=rs.fields("scala")%> </u></font></td>
</tr>
<tr>
<td colspan="2" width="497">
<table border="1" width="100%" id="table3" height="244" bordercolorlight="#000000" bordercolordark="#000000" style="border-collapse: collapse">
<tr>
<td valign="top" height="196" bordercolorlight="#000000" bordercolordark="#000000">
<font face="Tahoma" size="2">Spese</font>
<font face="Tahoma" size="2">
<%=rs.fields("spesa1")%></font></p>
<font face="Tahoma" size="2">
<%=rs.fields("spesa2")%></font></p>
<font face="Tahoma" size="2">
<%=rs.fields("spesa3")%></font></p>
<font face="Tahoma" size="2">
<%=rs.fields("spesa4")%></font></td>
<td width="98" valign="top" height="196">
<font face="Tahoma" size="2">€</font>
<font face="Tahoma" size="2"><%=rs.fields("euro1")%></font></p>
<font face="Tahoma" size="2"><%=rs.fields("euro2")%></font></p>
<font face="Tahoma" size="2"><%=rs.fields("euro3")%></font></p>
<font face="Tahoma" size="2"><%=rs.fields("euro4")%></font></p>
</td>
</tr>
<tr>
<td valign="top">
<p align="center">L'amministratore
________________________________________</td>
<td width="98" valign="middle">€ <font face="Tahoma" size="2"><%=rs.fields("totale")%></font></td>
</tr>
</table>
</td>
<td width="201"></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<%
i=i+1
rs.MoveNext
Loop
%>
<%
End If
%>
<%
rs.close
set rs=Nothing
%>