Ver Mensaje Individual
  #18 (permalink)  
Antiguo 08/09/2003, 12:23
Avatar de dobled
dobled
 
Fecha de Ingreso: enero-2002
Ubicación: Rancagua - Chile
Mensajes: 1.328
Antigüedad: 22 años, 4 meses
Puntos: 2
Asi funciona y ya lo aplique a mi reporte y quedo bien

Código PHP:
       NxSQL ="SELECT gastos, nombre FROM neox Order BY nombre"
       
Set RS Server.CreateObject("ADODB.Recordset")
       
RS.Open NxSQLoConn,3,1
%>
<
table width="720" border="1" cellpadding="0" cellspacing="1">
  <
tr bgcolor="#FFFFFF">
    <
td width="50%">Nombre</td>
    <
td>Gastos</td>
  </
tr>
<%do while 
not Rs.eof%>
<%
if 
Nxx "" Then
   Nxx 
Rs("nombre")
else
   
Nxx  Nxx
end 
if
%>
<%
if 
Nxx <> Rs("nombre"Then
%>
  <
tr bgcolor="#FFFFFF">
    <
td height="22"><div align="right"><b>Total= </div></td>
    <
td><b><%=total%> </td>
<%
total ""%>
  </
tr>
<%
else
end if
%>
  <
tr bgcolor="#FFFFFF">
    <
td height="22"><%=RS("nombre")%>
      </
td>
    <
td> <%=RS("gastos")%> </td>
<%
if 
total "" Then
   total 
Rs("gastos")
else
valor Rs("gastos")
total CINT(total) + CINT(valor)
end If

Nxx Rs("nombre")

Rs.movenext
loop
%>
  <
tr bgcolor="#FFFFFF">
    <
td height="22"><div align="right"><b>Total= </div></td>
    <
td><b><%=total%> </td>
<%
total ""%>

</
table>
<%
RS.Close
Set RS 
Nothing
oConn
.Close
Set oConn 
Nothing
%> 
__________________
Usa títulos específicos y con sentido
En las listas de correo o en los grupos de noticias, la cabecera del mensaje es tu oportunidad de oro para atraer la atención de expertos cualificados en aproximadamente 50 caracteres o menos. No los desperdicies en balbuceos como "Por favor ayúdame" (de "POR FAVOR AYÚDAME!!!" ya ni hablamos). No intentes impresionarnos con lo profundo de tu angustia; mejor usa ese preciado espacio para una descripción lo más concisa posible del problema.