Si facu, pero no le sirve (me parece!)
El tiene una tabla como la siguiente....
Código:
NOMBRE | DIRECCION | IMPORTE FACTURA
Diego | gaboto 55 | 56
Diego | gaboto 55 | 12
Diego | gaboto 55 | 33
Pablo | mitre 32 | 22
Pablo | mitre 32 | 10
Pablo | mitre 32 | 11
... y quiere mostrar los datos de esta manera...
Código:
NOMBRE | DIRECCION | IMPORTE FACTURA
Diego | gaboto 55 | 56
| | 12
| | 33
Pablo | mitre 32 | 22
| | 10
| | 11
... por eso le propuse hacerlo de esa manera.
Ahora bien, para el tema del total de cada cliente y el total general, podés hacer algo así:
Código:
<%
Select cliente, direccion, telefono, factura From clientes Order By cliente
Registro_Actual = ""
Response.Write "<table>"
Do while not rs.eof
If Rs("Cliente") <> Registro_Actual then
Response.Write "<tr><td>" & Rs("Cliente") & "</td><td>" & Rs("direccion") & "</td><td>" & Rs("telefono") & "</td><td>"
Else
Response.Write "<td></td><td></td><td></td><td>"
End if
Response.Write Rs("factura") & "</td></tr>"
If Rs("Cliente") <> Registro_Actual then
Total_Cliente = 0
Total_Cliente = Total_Cliente + Rs("Factura")
Else
Total_Cliente = Total_Cliente + Rs("Factura")
End if
Total_General = Total_General + Rs("Factura")
Registro_Actual = Rs("Cliente")
rs.movenext
loop
Response.Write "</table>"
%>
Y en las variables Total_Cliente y Total_General tenés los datos... ahora pensá como hacés para mostrarlos ;)
saludos