Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 23-04-2008
zvf zvf is offline
Miembro
 
Registrado: abr 2006
Posts: 158
Poder: 19
zvf Va por buen camino
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.
Responder Con Cita
  #2  
Antiguo 23-04-2008
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Poder: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
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
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita
  #3  
Antiguo 23-04-2008
zvf zvf is offline
Miembro
 
Registrado: abr 2006
Posts: 158
Poder: 19
zvf Va por buen camino
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
Responder Con Cita
  #4  
Antiguo 25-04-2008
zvf zvf is offline
Miembro
 
Registrado: abr 2006
Posts: 158
Poder: 19
zvf Va por buen camino
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.
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Crystal Reports 9 pabloparra Impresión 1 08-04-2008 09:44:35
Crystal Reports trex2000 Impresión 1 10-10-2006 22:19:06
VCL de Crystal Reports Ester Impresión 1 09-09-2004 11:04:49
¿Cómo enviar un TQuery a Crystal Reports como se hacía con Rave Reports? fitidavid Impresión 1 04-09-2004 18:56:39
crystal reports Repelus Impresión 0 10-03-2004 23:14:38


La franja horaria es GMT +2. Ahora son las 17:34:01.


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
Copyright 1996-2007 Club Delphi