Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/05/2004, 07:51
elmargaro
 
Fecha de Ingreso: febrero-2004
Mensajes: 65
Antigüedad: 20 años, 3 meses
Puntos: 1
aqui esta

<!-- #include virtual="/_private/config.asp" -->

<html>
<head>
<title>Reporte X</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- PRIMER PASO: Copiar dentro del tag HEAD -->
<script language="JavaScript">

ns=document.layers
ie=document.all

function esconde() {
if (ie) precarga.style.visibility="hidden";
if(ns) document.pregarga.visibility="hide";
}
// -->

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>

<style>
#precarga{position:absolute; width:100%; height:100%; top:0; left:0}
</style>
</head>
<body onload="esconde();MM_showHideLayers('Printer','',' show')" background="images/wlbk072.jpg" text="#000000" >
<%
Server.ScriptTimeout=15000
Response.Flush()
Dim rs,rsx,conn,lsStrconn,gtFecha1,gtFecha2,giVisible
Dim URL

gtFecha1=Request.QueryString("fecha1")
gtFecha2=Request.QueryString("fecha2")
URL="javascript:void(window.open('exreportedatosin comperroneos.asp?fecha1="& gtFecha1 &"&fecha2="& gtFecha2&"&Di="& Request.QueryString("Di")&"&De="& Request.QueryString("De")&"','Generando_Documento' ,'toolbar=no,location=no,status=no,scrollbars=no,w idth=400,height=200'))"

lsStrConn = cl_Conexion_DB
set conn = server.createobject("adodb.connection")
conn.open lsStrConn
%>
<!-- SEGUNDO PASO: Copiar dentro del tag BODY -->
<script language="JavaScript">
if(ie || ns) document.write('<div id="precarga" align="center"><br><br><br><br><br><br><b><font face="Arial" color="#000000" size="4">Ejecutando Consulta....</b><br>Por Favor Espere...!!!</font></div>');
</script>
<div id="Printer" style="position:absolute; left:751px; top:58px; width:69px; height:28px; z-index:1; visibility: hidden;"><a href="JavaScript:window.print();" title="Imprimir Página"><img src="images/print.gif" width="32" height="32" border="0"></a>
<a href=<%=URL%> title="Exportar Página a Archivo de Excel"><img src="images/xlsicon.gif" width="28" height="28" border="0"></a></div>
<%
giVisible=0

DatosIncompletos
if giVisible=0 then
%><div id="Printer" style="position:absolute; left:751px; top:58px; width:35px; height:28px; z-index:1; visibility: hidden;"></DIV><%
end if

Function DatosIncompletos
if Request.QueryString("Di")="S"then
Dim lsSqltxt,liColor

set rsx=createobject("ADODB.Recordset")
lsSqltxt="SELECT * FROM lectura_incomp where fh_recepcion between '"& gtFecha1 &" 00:00:00" &"' and '"& gtFecha2 &" 23:59:59.999'"
rsx.open lsSqltxt,conn
if not (rsx.eof and rsx.bof) then
giVisible=1
liColor=0 %>

<table width="75%" border=".5" align="center" cellpadding="2" cellspacing="0" bordercolor="GRay" rules="all" id="ProjectsGrid" style="border-color:White;border-style:None;width:75%;border-collapse:collapse;">
<tr align="center" >
<th nowrap bgcolor="#009933" scope="col"><font color="#FFFFFF" size="3" face="Arial">Medidor</FONT></th>
<th nowrap bgcolor="#009933" scope="col"><font color="#FFFFFF" size="3" face="Arial">Fecha de Recepción en el NS</FONT></th>
<th nowrap bgcolor="#009933" scope="col"><font color="#FFFFFF" size="3" face="Arial">Variable</FONT></th>
</tr><%
rsx.MoveFirst
do while not rsx.eof
%><tr><%
if liColor=1 then %>
<td align="center" nowrap bgcolor="#FFFFFF"><font face="Arial" size="3"><strong><%=rsx("cl_idcfe")%></strong></font></td>
<td align="center" nowrap bgcolor="#FFFFFF"><font face="Arial" size="3"><strong><%=rsx("fh_recepcion")%></strong></font></td>
<td align="center" nowrap bgcolor="#FFFFFF"><font face="Arial" size="3"><strong><%=rsx("cl_varuca")%></strong></font></td><%
liColor=0
else %>
<td align="center" nowrap><font face="Arial" size="3"><strong><%=rsx("cl_idcfe")%></strong></font></td>
<td align="center" nowrap><font face="Arial" size="3"><strong><%=rsx("fh_recepcion")%></strong></font></td>
<td align="center" nowrap><font face="Arial" size="3"><strong><%=rsx("cl_varuca")%></strong></font></td><%
liColor=1
end if
%></tr><%
rsx.moveNext
loop
rsx.close
set rsx=nothing
%>
<br><BR><BR><Center><font face="Arial" size="6"><%="DATOS INCOMPLETOS"%></Font></Center><BR>
<center><FONT FACE="ARIAL" size="4"><%="DE"%>&#160&#160 <%=gtFecha1 &" 00:00:00"%> &#160&#160<%=" HASTA "%>&#160&#160 <%=gtFecha2 &" 23:59:59"%></font></center>
<br>
</table>
<%
else
%><center><FONT FACE="ARIAL" size="4">NO EXISTEN DATOS PARA MOSTRAR</font></center><%
end if
end if
if Request.QueryString("De")="S"then

set rsx=createobject("ADODB.Recordset")
lsSqltxt="SELECT * FROM lectura_errhr where fh_lectura between '"& gtFecha1 &" 00:00:00" &"' and '"& gtFecha2 &" 23:59:59.999'"
rsx.open lsSqltxt,conn
if not (rsx.eof and rsx.bof) then
giVisible=1
liColor=0 %>
<br>
<table width="75%" border=".5" align="center" cellpadding="2" cellspacing="0" bordercolor="GRay" rules="all" id="ProjectsGrid" style="border-color:White;border-style:None;width:75%;border-collapse:collapse;">
<tr align="center" >
<th nowrap bgcolor="#009933" scope="col"><font color="#FFFFFF" size="3" face="Arial">Medidor</FONT></th>
<th nowrap bgcolor="#009933" scope="col"><font color="#FFFFFF" size="3" face="Arial">Fecha de Lectura</FONT></th>
<th nowrap bgcolor="#009933" scope="col"><font color="#FFFFFF" size="3" face="Arial">Fecha de Recepción en el NS</FONT></th>
<th nowrap bgcolor="#009933" scope="col"><font color="#FFFFFF" size="3" face="Arial">Variable</FONT></th>
</tr><%
rsx.MoveFirst
do while not rsx.eof
%><tr><%
if liColor=1 then %>
<td align="center" nowrap bgcolor="#FFFFFF"><font face="Arial" size="3"><strong><%=rsx("cl_idcfe")%></strong></font></td>
<td align="center" nowrap bgcolor="#FFFFFF"><font face="Arial" size="3"><strong><%=rsx("fh_lectura")%></strong></font></td>
<td align="center" nowrap bgcolor="#FFFFFF"><font face="Arial" size="3"><strong><%=rsx("fh_recepcion")%></strong></font></td>

<td align="center" nowrap bgcolor="#FFFFFF"><font face="Arial" size="3"><strong><%=rsx("cl_varuca")%></strong></font></td><%
liColor=0
else %>
<td align="center" nowrap><font face="Arial" size="3"><strong><%=rsx("cl_idcfe")%></strong></font></td>
<td align="center" nowrap><font face="Arial" size="3"><strong><%=rsx("fh_lectura")%></strong></font></td>
<td align="center" nowrap><font face="Arial" size="3"><strong><%=rsx("fh_recepcion")%></strong></font></td>
<td align="center" nowrap><font face="Arial" size="3"><strong><%=rsx("cl_varuca")%></strong></font></td><%
liColor=1
end if
%></tr><%
rsx.moveNext
loop
rsx.close
set rsx=nothing
%>
<BR><BR><Center><font face="Arial" size="6">DATOS ERRONEOS</Font></Center><BR>
<center><FONT FACE="ARIAL" size="4">DE&#160&#160 <%=gtFecha1%> 00:00:00 &#160&#160 HASTA &#160&#160 <%=gtFecha2%> 23:59:59</font></center><br>
</table><%
else
%><center><FONT FACE="ARIAL" size="4">NO EXISTEN DATOS PARA MOSTRAR</font></center><%
end if
end if
End Function
%>
</body>
</html>



bueno todo ese chorizote es el codigo una manera que encontre de solucionarlo por lo pronto es no ejecutar dos funciones seguidas dado que me di cuenta que cuando el reporte ejecutaba una al terminar era cuando desplegaba los datos y luego ejecutaba la segunda asi que por lo pronto hice un menu que solo permite ejecutar una funcion a la vez y ahi ya no se empalman los datos
__________________
eL MArgARo