Jump to content
Fórum Script Brasil
  • 0

Filtro Simples


PRISCILA STOCHINI
 Share

Question

Estou com o seguinte problema...Criei os filtros normalmente.

Mas não estou conseguindo fazer aparecer na tela..APENAS os cadastros que relacionam com o link clicado. Aparece todos os cadastros e o que se relaciona como se o link tivesse sido clicado. O que quero é tenho um relatorio completo e quero nesta mesma página, clicar num dado e deste formar um relatorio "espeficico"...

Que pode me ajudar...só falta a parte de aparecer os dados relacionados com o link do click!!!

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

</head>
      
<% 
vdata = request.querystring ("data")
If data <> "" Then
sql = sql & " where data='"&vdata&"'"
End If

vcodigo = request.querystring ("codigo")
If vcodigo <> "" Then
sql = sql & " where codigo='"&vcodigo&"'"
End If

vusuario = request.querystring ("usuario")
If vusuario <> "" Then
sql = sql & " where usuario='"&vusuario&"'"
End If

vddd = request.querystring ("ddd")
If vddd <> "" Then
sql = sql & " where ddd='" & vddd &"'"
End If

vtipo = request.querystring ("tipo")
If vtipo <> "" Then
sql = sql & " where tipo='" & vtipo &" '"
End If

vsoftware = request.querystring ("software")
If vsoftware <> "" Then
sql = sql & " where software='" & vsoftware&"'"
End If

sql = "Select * From suptec Where pendencia = true ORDER BY data DESC"
    
Set rs = bco.Execute(sql)

if rs.eof then 
Response.Write("<p align=""center"">NÃO HÁ PENDENCIAS</p>") 
else

%>
<body>
<div id="Layer1" style="position:absolute; left:10px; top:10px; width:990px; height:580px; z-index:1; overflow:auto;">
<form>
  <table width="427" border="1" align="center">
    <tr>
      <td width="135"><div align="center"><span class="style6"><a href="../suporte/indice.asp">Indice - SIM</a></span></div></td>
      <td width="135"><div align="center"><span class="style6"><a href="relatorio_total.asp">Total</a></span></div></td>
      <td width="135"><div align="center"><a href="relatorio_resolvidas.asp"><span class="style6">Solucionadas</span></a></div></td>
    </tr>
  </table>
  <p><input name="id" type="hidden" id="id" value="<%=rs("id")%>">
  </p>
  <table width="513" border="1" align="center" cellspacing="1" bordercolor="#CCCCCC">
    <tr>
      <td colspan="9"><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold">Relat&oacute;rio de Pend&ecirc;ncias de D&uacute;vidas do SIM </span></div></td>
    </tr>
    <tr>
      <td><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold">Data</span></div></td>
      <td><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold">C&oacute;digo</span></div></td>
      <td><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold">Usuario</span></div></td>
      <td><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold">Contato</span></div></td>
      <td><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold">DDD</span></div></td>
      <td><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold">Tipo</span></div></td>
      <td><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold">Software</span></div></td>
      <td><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold">Assunto</span></div></td>
      <td><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold">Resposta</span></div></td>
      </tr>
<%
contado=0
Do While Not rs.eof
contador=contador+1
%>
    <tr>
      <td nowrap="nowrap"><div align="center"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><a href="relatorio_FILTRO.asp?data=<%=rs("data")%>"><%=rs("data")%></a></span></div></td>
      <td nowrap="nowrap"><div align="left"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><a href="relatorio_FILTRO.asp?codigo=<%=rs("codigo")%>"><%=rs("codigo")%></a></span></div></td>
      <td nowrap="nowrap"><div align="left"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><a href="relatorio_FILTRO.asp?usuario=<%=rs("usuario")%>"><%=rs("usuario")%></a></span></div></td>
      <td nowrap="nowrap"><div align="left"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><%=rs("contato")%></span></div></td>
      <td nowrap="nowrap"><div align="left"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><a href="relatorio_FILTRO.asp?ddd=<%=rs("ddd")%>"><%=rs("ddd")%></a></span></div></td>
      <td nowrap="nowrap"><div align="left"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><a href="relatorio_FILTRO.asp?tipo=<%=rs("tipo")%>"><%=rs("tipo")%></a></span></div></td>
      <td nowrap="nowrap"><div align="left"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><a href="relatorio_FILTRO.asp?software=<%=rs("software")%>"><%=rs("software")%></a></span></div>
      <div align="center"></div></td>
      <td nowrap="nowrap"><div align="left"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><%=rs("resumo")%></span></div></td>
      <td nowrap="nowrap"><div align="center">
        <div align="center"><a href="resposta_suporte.asp?id=<%=rs("id")%>" class="link02 style9">[Responder]</a></div>
      </div></td>
      </tr>
<%
rs.Movenext
Loop 
End if

rs.close
Set rs=nothing
bco.close
Set rs=nothing
%>
  </table>

    <br />
  </form>
</div>
</body>
</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.9k
    • Total Posts
      648.8k
×
×
  • Create New...