CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    8

    urgent help with crviewer control

    im in need of urgent help.im doing a project where i have created a report using seagate crystal reports.when i click on a command button in vbform itgoes to another form where i have placed my crviewer control.
    i have written the following and i get a blank viewer when run

    Dim crApp As CRAXDRT.Application
    Dim Report As CRAXDRT.Report
    Dim strSelectionfrm As String

    Private Sub CRViewer1_CloseButtonClicked(UseDefault As Boolean)
    Set crApp = New CRAXDRT.Application
    Set Report = crApp.OpenReport("c:\project\rpt1.rpt")

    CRViewer.ReportSource = Report
    CRViewer.ViewReport
    End Sub

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: urgent help with crviewer control

    If looks like all your code is in the close button event? I don't use Crystal reports but from a quick glance at the code it looks like the report is only set when you click the close button at best that is a bad choice of where to put the code.

  3. #3
    Join Date
    Jul 2009
    Posts
    8

    Re: urgent help with crviewer control

    can you tell me how to go about it then?thanks for the help

  4. #4
    Join Date
    Jul 2009
    Posts
    8

    Re: urgent help with crviewer control

    even after giving the code in form_load() its displaying a blank viewer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured