Bueno, manos a la obra, los pasos para crear el Visor son:
- Cree un vb project ( standard exe o ocx).
- Vera un formulario vacio.
- Vaya a Project > Components
- Seleccione "Crystal Activex Report Viewer Library 11.0" y de click en OK, aparecera un nuevo icono en la barra de herramientas.
- Luego vaya a Project > References.
- Y seleccione "Crystal Report Activex Designer Runtime Library 11.0"
- En el formulario vacio, arrastre un crystal report viewer desde la barra de herramientas. Y nombrelo "crsv1".
- Luego escriba el siguiente codigo:
'***************************************************************************************
'* This project uses the following reference for the CRAXDRT object
'* Crystal Report Activex Designer Runtime Library 11.0
'***************************************************************************************
Private Sub Form_Load()
Dim Report As New CRAXDRT.Application
setViewerSize
crsv1.ReportSource = Report.OpenReport("D:\USUARIO\reporte.rpt")
crsv1.ViewReport
End Sub
Private Sub form_resize()
setViewerSize
End Sub
Private Sub setViewerSize()
crsv1.Width = Form1.Width - 100
crsv1.Height = Form1.Height - 400
End Sub
Eso es todo, el enlace vbforums.Comentarios?

0 comentarios:
Publicar un comentario
Gracias por el aporte.