p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Using the Crystal Reports Viewer Component


Message #1 by Terrence Joubert <Terrence@v...> on Tue, 6 Nov 2001 11:33:19 +0400
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C16695.4F46C1A0

Content-Type: text/plain





Hi,



I am using Crystal Reports 8. 

Crystal reports installs a Report Viewer ActiveX control. Most developers

use that control to have end users view their reports inside web pages. I

have never used it before. I want to use it on a VB 6 Form object. Can

anyone provide me with the steps required to:



*	Assign a report to the viewer control.

*	Have the control generate the report.



This is how I've been trying to do it, but it does not work:



Private Sub Form_Load()

    Dim webBroker, repSource

   

    Set webBroker = CreateObject("WebReportBroker.WebReportBroker")

    Set repSource = CreateObject("WebReportSource.WebReportSource")

    

    With repSource

        .ReportSource = webBroker

        .URL = "D:\Software Test\Crystal Reports\Customers.rpt"

    End With

             

    With CRViewer

        .ReportSource = repSource

        .EnableAnimationCtrl = True

        .ViewReport

        .Refresh

    End With

End Sub





Thanks for any help you may provide

Terrence 




Message #2 by "Yama Kamyar" <y.kamyar@e...> on Tue, 06 Nov 2001 11:07:01 -0800
Hi,



Can you provide me what error messages you are getting? I see nothing wrong with your code.



Have referenced the Seagate Crystal Web Broker? the Crystal Report 8.5 designer run-time library? Have you included the CRViewer
into your form?



Yama Kamyar

--



On Tue, 6 Nov 2001 11:33:19    Terrence Joubert wrote:

>

>Hi,

>

>I am using Crystal Reports 8. 

>Crystal reports installs a Report Viewer ActiveX control. Most developers

>use that control to have end users view their reports inside web pages. I

>have never used it before. I want to use it on a VB 6 Form object. Can

>anyone provide me with the steps required to:

>

>*	Assign a report to the viewer control.

>*	Have the control generate the report.

>

>This is how I've been trying to do it, but it does not work:

>

>Private Sub Form_Load()

>    Dim webBroker, repSource

>   

>    Set webBroker = CreateObject("WebReportBroker.WebReportBroker")

>    Set repSource = CreateObject("WebReportSource.WebReportSource")

>    

>    With repSource

>        .ReportSource = webBroker

>        .URL = "D:\Software Test\Crystal Reports\Customers.rpt"

>    End With

>             

>    With CRViewer

>        .ReportSource = repSource

>        .EnableAnimationCtrl = True

>        .ViewReport

>        .Refresh

>    End With

>End Sub

>

>

>Thanks for any help you may provide

>Terrence 

>

>




>

>





Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com


  Return to Index