Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   ASP clásico y crystal reports (https://www.clubdelphi.com/foros/showthread.php?t=55663)

zvf 23-04-2008 16:04:31

ASP clásico y crystal reports
 
Buen día:

Estoy tratando de abrir con asp, dos reportes en crystal reports pero no puedo hacerlo, hasta el momento solo me abre 1 de ellos con el siguiente código:

Código:


<%
'This file contains the HTML code to instantiate the Smart Viewer ActiveX.     
'                                                                   
'You will notice that the Report Name parameter references the rptserver.asp file.
'This is because the report pages are actually created by rptserver.asp.
'Rptserver.asp accesses session("oApp"), session("oRpt") and session("oPageEngine")
'to create the report pages that will be rendered by the ActiveX Smart Viewer.
'
%>
<HTML>
<HEAD>
<TITLE>HUECOS TOTALES</TITLE>
</HEAD>
<BODY BGCOLOR=C6C6C6 LANGUAGE=VBScript ONLOAD="Page_Initialize">
<OBJECT ID="CRViewer"
 CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
 WIDTH=100% HEIGHT=95%
 CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=2,2,4,28">
<PARAM NAME="EnableRefreshButton" VALUE=1>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=1>
<PARAM NAME="EnableDrillDown" VALUE=0>
<PARAM NAME="EnableSearchControl" VALUE=0>
<PARAM NAME="EnableAnimationControl" VALUE=0>
<PARAM NAME="EnableZoomControl" VALUE=0>
</OBJECT>
  <SCRIPT LANGUAGE="VBScript">
 <!--
Sub Page_Initialize
 On Error Resume Next
 Dim webBroker
 Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
 Dim webSource
 Set webSource = CreateObject("WebReportSource.WebReportSource")
 webSource.ReportSource = webBroker
 webSource.URL = Location.Protocol + "//koch/reportes/I_Huecos_totales.rpt"
 webSource.PromptOnRefresh = True
 CRViewer.ReportSource = webSource
 CRViewer.ViewReport
End Sub
-->
</SCRIPT>
</BODY>
</HTML>

Esto me lo hace bien, me abre en una página ese reporte. Los que quisiera sería que en la página, en una columna me apareciera 1 reporte de crystal y en otra columna otro reporte de crystal y de ser posible con una barra para deslizarme hacia abajo o hacia los lados si es que la informaciòn no se alcanzara a visualizar.
No se si me di a entender, tal vez sería hacer la tabla con html, pero no se como exactamente, y al intentar realizarlo solo me aparece la página en blanco y con errores.

Gracias de antemano por su ayuda.

dec 23-04-2008 16:23:03

Hola,

Creo que sería cuestión de añadir el "VBscript" que ahora añades, directamente, en el "BODY" de la página, digo, hacerlo en un determinado elemento, por ejemplo, la celda de una tabla, si así lo deseas:

Código PHP:


<html>
 <
body>
  <
table summary="Reportes de usuario">
   <
thead>
    <
tr>
     <
th>Primer reporte</th>
     <
th>Segundo reporte</th>
    </
tr>
   </
thead>
   <
tbody>
    <
tr>
     <
td><!-- VBScript del primer reporte --></td>
     <
td><!-- VBScript del segundo reporte --></td>
    </
tr>
   </
tbody>
  </
table>
 </
body>
</
html


zvf 23-04-2008 22:36:15

Gracias por tu respuesta.

Ahora surge un problema, ya me los acomoda bien, y me muestra dos objetos para desplegar reportes, el problema es que en uno no me despliega nada y en el otro si, no se si tenga algún error en el código, mira lo puse como me dijiste y quedo así:

Código:

<table summary="Reportes de usuario" width="633">
    <tr>
    <td><b>Primer reporte</b></td>
    <td width="305"><b>Segundo reporte</b></td>
    </tr>
  </table>

<table summary="Reportes de usuario">
  <tbody>
    <tr>
    <td>
    <SCRIPT LANGUAGE="VBScript">
 Sub Page_Initialize
 On Error Resume Next
 Dim webBroker1
 Set webBroker1 = CreateObject("WebReportBroker.WebReportBroker")
 Dim webSource1
 Set webSource1 = CreateObject("WebReportSource.WebReportSource")
 webSource1.ReportSource = webBroker
 webSource1.URL = Location.Protocol + "//koch/reportes/I_Huecos_Totales.rpt"
 webSource1.PromptOnRefresh = True
 CRViewer1.ReportSource = webSource1
 CRViewer1.ViewReport
 End Sub
 </SCRIPT>
 </td>
    <td>   
    <SCRIPT LANGUAGE="VBScript">
 Sub Page_Initialize
 On Error Resume Next
 Dim webBroker
 Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
 Dim webSource
 Set webSource = CreateObject("WebReportSource.WebReportSource")
 webSource.ReportSource = webBroker
 webSource.URL = Location.Protocol + "//koch/reportes/I_CapacidadesClinicas.rpt"
 webSource.PromptOnRefresh = True
 CRViewer.ReportSource = webSource
 CRViewer.ViewReport
 End Sub
 </SCRIPT>
    </td>
    </tr>
  </tbody>
  </table>

Además cree dos objetos para visualizar el reporte en crystal de la siguiente manera:

Código:

<OBJECT ID="CRViewer1"
 CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
 WIDTH=45% HEIGHT=95%
 CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=2,2,4,28">
<PARAM NAME="EnableRefreshButton" VALUE=1>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=1>
<PARAM NAME="EnableDrillDown" VALUE=0>
<PARAM NAME="EnableSearchControl" VALUE=0>
<PARAM NAME="EnableAnimationControl" VALUE=0>
<PARAM NAME="EnableZoomControl" VALUE=0>
</OBJECT>
 
<OBJECT ID="CRViewer"
 CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
 WIDTH=45% HEIGHT=95%
 CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=2,2,4,28">
<PARAM NAME="EnableRefreshButton" VALUE=1>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=1>
<PARAM NAME="EnableDrillDown" VALUE=0>
<PARAM NAME="EnableSearchControl" VALUE=0>
<PARAM NAME="EnableAnimationControl" VALUE=0>
<PARAM NAME="EnableZoomControl" VALUE=0>
</OBJECT>

Pero no se porque no me puede mostrar los dos reportes a la vez, me muestra siempre uno en blanco y el otro bien.

Gracias, gracias por tu apoyo y atenciòn a mi pregunta :)

zvf 25-04-2008 16:08:32

Hola a todos!!

Si alguien sabe cual es mi error, les agradecería mucho que me lo dijeran.
He intentado de mil formas, realizo movimientos de variables y no consigo que se vean los dos reportes a la vez, con algunos movimientos me muestra uno y con otros el segundo, pero nunca los dos.

Muchas gracias.


La franja horaria es GMT +2. Ahora son las 19:53:19.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi