Results 1 to 3 of 3

Thread: Help opening a Crystal Report (v10.0) VB6.0

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    5

    Help opening a Crystal Report (v10.0) VB6.0

    My code is:
    VB Code:
    1. Sub OpenReport()
    2.  
    3.    Dim CR_CustomApp As New CRAXDRT.Application
    4.    Dim CR_CustomReport As CRAXDRT.Report
    5.          
    6.    
    7.    Set CR_CustomReport = CR_CustomApp.OpenReport("c:\test.rpt", 1)
    8.  
    9.    End Sub

    When I run it, it completes, but the report is not opened. Any suggestions please?

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: Help opening a Crystal Report (v10.0) VB6.0

    This is the code I used in CR 9. Maybe it is close. It appears that you don't actually execute the report, only assign it to a file.

    VB Code:
    1. Set Report = crxApplication.OpenReport("Z:\DAD\BalanceReconcile.rpt", 1)
    2. For Each crxDatabaseTable In Report.Database.Tables
    3.      crxDatabaseTable.ConnectionProperties("user id") = "sa"
    4.      crxDatabaseTable.ConnectionProperties("Password") = myPasswordTechniSQL
    5. Next crxDatabaseTable
    6. Report.PaperOrientation = crDefaultPaperOrientation
    7. Report.PrintOut False

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    5

    Re: Help opening a Crystal Report (v10.0) VB6.0

    Thanks for your help. How do I just open the report and refresh the data (i.e. not print it, just display it)?

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