Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/08/2007, 01:40
Essftg
 
Fecha de Ingreso: septiembre-2004
Mensajes: 76
Antigüedad: 20 años, 7 meses
Puntos: 0
Problemas Al Sumar Con Valores Null

Hola tengo un problema y no se muy bien como solucionarlo, es el siguiente
-----------------------------------
Tipo de error:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'formatNumber'
/Tienda_virtual_pe07/OTI07/Espanol/reviewOrder.asp, línea 1197
-----------------------------------
Todo esto lo coge de una base de datos en los cuales se han insertado valores o no
intProdPrice = rsReview("precio")
intQuant = rsReview("quantity")
intQuant2 = rsReview("quantity2")
intQuant3 = rsReview("quantity3")
intQuant4 = rsReview("quantity4")
intQuant5 = rsReview("quantity5")

intTotal =intTotal + (intQuant * intProdPrice)+ (intQuant2 * intProdPrice)+ (intQuant3 * intProdPrice)+ (intQuant4 * intProdPrice)+ (intQuant5 * intProdPrice) --AQUI LE DOY A LA VARIABLE PARA Q ME HAGA EL SUMATORIO DE LAS CANTIDADES * EL PRECIO
<%if intQuant >0 then%>

<input name="quant<%= intProdID %>" size="3" value=" <%=intQuant%>" onChange="HandleError(this)">
</font></div></td>

<td width="8%" align="left"><div align="center" class="Estilo18"><font face="ARIAL" size="2">&nbsp;<%= strRefer %> </font></div></td>

<td width="15%" align="right"><span class="Estilo18"><font face="Arial" size="2"><%= formatNumber(intProdPrice, 2) %> &euro;</font></span></td>

<td width="14%" align="right"><span class="Estilo18"><font face="Arial" size="2"><%= formatNumber((intQuant * intProdPrice), 2) %> &euro; </font></span></td>

<% end if%>
Y ASI CON LAS 5, PERO EN ALGUNAS CANTIDADES NO TIENE VALOR ES DECIR UN NULL
LO Q NECESITO QUE ME HAGA ES EL SUMAR TODO INTTOTAL
<td><div align="center" class="Estilo18"><strong><%= formatNumber(INTTOTAL,2) %> &euro; </strong></div></td>
NO SE COMO HACERLO SI ALGUIEN ME PUEDE AYUDAR GRACIAS