
07/02/2009, 02:25
|
| | Fecha de Ingreso: mayo-2006
Mensajes: 12
Antigüedad: 18 años, 11 meses Puntos: 0 | |
Problema Crystal Report. Buenas a todos.
Espero que me puedan ayudar.
Tengo que este codigo que tiene un problema al llamarlo a través de la intranet me crea el objeto de crystal pero no me muestra el informe y ningun error.
<%
function menordiez(valor)
if valor<10 then
menordiez="0"&valor
else
menordiez=valor
end if
end function
fecha1=Request.form("prompt0")
dia1=menordiez(Day(fecha1))
mes1=menordiez(Month(fecha1))
ano1=Year(fecha1)
VUE=Request.form("prompt1")
'response.write fecha1&"<br>"
'response.write fecha2&"<br>"
'response.end
%>
<html>
<head>
<TITLE>Crystal Report Viewer </TITLE>
</head>
<BODY BGCOLOR=C6C6C6 LANGUAGE=VBScript>
<OBJECT ID="CRViewer"
CLASSID="CLSID:2DEF4530-8CE6-41c9-84B6-A54536C90213"
WIDTH=100% HEIGHT=99%
CODEBASE="/viewer9/activeXViewer/activexviewer.cab#Version=9,2,0,442" VIEWASTEXT>
<PARAM NAME="EnableRefreshButton" VALUE=0>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnablePrintButton" VALUE=0>
<PARAM NAME="EnableExportButton" VALUE=0>
<PARAM NAME="EnableDrillDown" VALUE=0>
<PARAM NAME="EnableSearchControl" VALUE=0>
<PARAM NAME="EnableAnimationControl" VALUE=0>
<PARAM NAME="EnableZoomControl" VALUE=0>
<PARAM NAME="EnableSelectExpertButton" VALUE=0>
</OBJECT>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Window_OnLoad()
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject("WebReportBroker9.WebReportBroker")
If ScriptEngineMajorVersion < 2 Then
window.alert "IE 3.02 users need to get the latest version of VBScript or install IE 4.01 SP1 or newer. Users of Windows 95 additionally need DCOM95. These files are available at Microsoft's web site."
else
Dim webSource
Set webSource = CreateObject("WebReportSource9.WebReportSource")
webSource.ReportSource = webBroker
webSource.URL = "direccion1"
webSource.PromptOnRefresh = True
webSource.AddParameter "user0", "user"
webSource.AddParameter "password0", "pass"
webSource.AddParameter "prompt0", "<% Response.write ("("&ano1&", "&mes1&", "&dia1&")")%>"
webSource.AddParameter "prompt1", "<% Response.write VUE %>"
CRViewer.ReportSource = webSource
end if
CRViewer.ViewReport
End Sub
-->
</SCRIPT>
</body>
</html>
Ahora tengo este otro código que es el mismo que les he colocado arriba a diferencia que el archivo rpt se encuentra en otra ruta.
<%
function menordiez(valor)
if valor<10 then
menordiez="0"&valor
else
menordiez=valor
end if
end function
fecha1=Request.form("prompt0")
dia1=menordiez(Day(fecha1))
mes1=menordiez(Month(fecha1))
ano1=Year(fecha1)
VUE=Request.form("prompt1")
'response.write fecha1&"<br>"
'response.write fecha2&"<br>"
'response.end
%>
<html>
<head>
<TITLE>Crystal Report Viewer </TITLE>
</head>
<BODY BGCOLOR=C6C6C6 LANGUAGE=VBScript>
<OBJECT ID="CRViewer"
CLASSID="CLSID:2DEF4530-8CE6-41c9-84B6-A54536C90213"
WIDTH=100% HEIGHT=99%
CODEBASE="/viewer9/activeXViewer/activexviewer.cab#Version=9,2,0,442" VIEWASTEXT>
<PARAM NAME="EnableRefreshButton" VALUE=0>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnablePrintButton" VALUE=0>
<PARAM NAME="EnableExportButton" VALUE=0>
<PARAM NAME="EnableDrillDown" VALUE=0>
<PARAM NAME="EnableSearchControl" VALUE=0>
<PARAM NAME="EnableAnimationControl" VALUE=0>
<PARAM NAME="EnableZoomControl" VALUE=0>
<PARAM NAME="EnableSelectExpertButton" VALUE=0>
</OBJECT>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Window_OnLoad()
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject("WebReportBroker9.WebReportBroker")
If ScriptEngineMajorVersion < 2 Then
window.alert "IE 3.02 users need to get the latest version of VBScript or install IE 4.01 SP1 or newer. Users of Windows 95 additionally need DCOM95. These files are available at Microsoft's web site."
else
Dim webSource
Set webSource = CreateObject("WebReportSource9.WebReportSource")
webSource.ReportSource = webBroker
webSource.URL = "direccion2"
webSource.PromptOnRefresh = True
webSource.AddParameter "user0", "user"
webSource.AddParameter "password0", "pass"
webSource.AddParameter "prompt0", "<% Response.write ("("&ano1&", "&mes1&", "&dia1&")")%>"
webSource.AddParameter "prompt1", "<% Response.write VUE %>"
CRViewer.ReportSource = webSource
end if
CRViewer.ViewReport
End Sub
-->
</SCRIPT>
</body>
</html>
He probado que el fichero se encuentra en la ruta. Lo puedo abrir a través del explorador si me dirijo a la ruta pero no a través de una intranet.
alguien me podría ayudar???.
Saludos.
Última edición por guerrardguez; 07/02/2009 a las 06:49 |