Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
galera tah dando erro de overflow
Microsoft VBScript runtime error '800a0006'
Overflow
/chamado/gerarelatorio.asp, line 329
vou mostrar o codigo
strSQL=("Select nomUser from tbUser")
call Conecta
call AbreRs(strSQL)
n=cdbl(rs.recordcount)
dim analista(50)
for i = 1 to n
analista(i) = rs("nomUser")
rs.movenext
next
call fechaRs
call Desconecta
data_com = request.QueryString("data_com")
data_fim = request.QueryString("data_fin")
unidade = request.QueryString("unidade")
para = Request.QueryString("para")
data_ini = FData(data_com)
data_fin = FData(data_fim)
dim countUSER(150)
dim countOK(150)
dim countAndamento(150)
dim countSE(150)
dim countFechado(150)
for i = cdbl(1) to cdbl(n+1)
strSQL = ("Select * from tbChamado WHERE uniChamado like '%" & unidade & "%' and dstChamado like '%" & para & "%' and dtChamado BETWEEN '" & data_ini& "' and '" & data_fin & "' and altChamado='"& analista(i) &"' ORDER BY numChamado DESC")
call Conecta
call AbreRs(strSQL)
countUSER(i) = cdbl(Rs.RecordCount)
countOK(i) = cdbl(0)
countAndamento(i) = cdbl(0)
countSE(i) = cdbl(0)
countFechado(i) = cdbl(0)
do while not rs.EOF
statos = rs("stsChamado")
if statos = "OK" then
countOK(i) = cdbl(countOK(i) + 1)
end if
if statos = "em andamento" then
countAndamento(i) = cdbl(countAndamento(i) + 1)
end if
if statos = "Serviço Externo" then
countSE(i) = cdbl(countSE(i) + 1)
end if
rs.movenext
loop
call FechaRs
call Desconecta
'response.write((countOK(i)/countUser(i))*100)
'response.End()
next
%>
<table align="center" cellpadding="0" cellspacing="1" border="0">
<tr >
<td align="right" class="Verdana_16px" colspan="5">
<hr color="#084505" size="2" />
<font size="+2" color="#084505">
Relatório
</font>
<hr color="#084505" size="2" />
</td>
<td align="right" class="Verdana_16px" colspan="2">
<hr color="#084505" size="2" />
<font size="+2" color="#084505">
<strong>
<a href="sessionend.asp" class="linkVerdana_12px">Sair</a>
</strong>
</font>
<hr color="#084505" size="2"/>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="Verdana_14px" colspan="5" align="center" style="border:#003366; border:solid; border-width:3px" >
Relatório de Estatística de Chamado<b>
<%if unidade = "" or para = "" then
unidade = "Unidades"
para = "Ambas"
response.Write(unidade &"-" & para)
end if%></b>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="center" class="Verdana_12px" style="border:#003366; border:solid; border-width:2px;">
Técnico
</td>
<td align="center" class="Verdana_12px" style="border:#003366; border:solid; border-width:2px;">
Em Andamento
</td>
<td align="center" class="Verdana_12px" style="border:#003366; border:solid; border-width:2px;">
Serviço Externo
</td>
<td align="center" class="Verdana_12px" style="border:#003366; border:solid; border-width:2px;">
Fechados
</td>
<td align="center" class="Verdana_12px" style="border:#003366; border:solid; border-width:2px;">
Total </td>
</tr>
<%
cor="#CCCCCC"
for i= cdbl(1) to cdbl(n)
'do while not rs.eof
if cor = "#CCCCCC" then
cor = "#FFFFFF"
else
cor = "#CCCCCC"
end if
%>
<tr bgcolor="<%=cor%>" height="30">
<td class="Verdana_12px" >
<strong>
<%
response.Write(analista(i))
%>
</strong>
</td>
<td class="Verdana_12px" >
<strong>
<%
countAndamento(i) = cdbl((countAndamento(i) / countUser(i)) * 100)
response.Write(cdbl(left(countAndamento(i),4))&"%")
%>
</strong>
</td>
<td class="Verdana_12px" >
<strong>
<%
countSE(i) = cdbl((countSE(i) / countUser(i)) * 100)
response.Write(cdbl(left(countSE(i),4))&"%")
%>
</strong>
</td>
<td class="Verdana_12px" >
<strong>
<%
countOK(i) = cdbl((countOK(i) / countUser(i)) * 100)
response.Write(cdbl(left(countOK(i),4))&"%")
%>
</strong>
</td>
<td class="Verdana_12px" >
<strong>
<%response.Write(cdbl(countUser(i)))%>
</strong>
</td>Carregando comentários...