Results 1 to 3 of 3

Thread: Connect CR 8.5 To SQL Server

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    4

    Connect CR 8.5 To SQL Server

    Hi ! rajan,
    Could u please tell me how to connect to crystal report 8.5 to sql server from visual basic 6.0.
    Last edited by Hack; Dec 29th, 2005 at 11:12 AM.

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

    Re: how to call external crystal reports xi in vb6

    This is how I connect CR9 to SQL Server 2000:

    VB Code:
    1. Dim PRINTREPLY As VbMsgBoxResult
    2. PRINTREPLY = MsgBox("Print to screen?", vbYesNo)
    3. If PRINTREPLY = vbNo Then
    4.     glbPrinterDestination = 1
    5. '    CommonDialog1.ShowPrinter
    6. Else
    7.     glbPrinterDestination = 0
    8. End If
    9.  
    10. --The above code sets a flag for either printing or using the viewer
    11.  
    12. Set Report = crxApplication.OpenReport("Z:\DAD\MachineUsage.rpt", 1)
    13. For Each crxDatabaseTable In Report.Database.Tables
    14.     crxDatabaseTable.ConnectionProperties("user id") = "sa"
    15.     crxDatabaseTable.ConnectionProperties("Password") = myPasswordTechniSQL
    16. Next crxDatabaseTable
    17. Report.PaperOrientation = crDefaultPaperOrientation
    18. If glbPrinterDestination = 0 Then
    19.     glbReportForm = "frmProduction"
    20.     CRViewer.Show 1
    21. Else
    22.     Report.PrintOut False
    23. End If








    Edit: Fixed [vbcode][/vbcode] tags. - Hack
    Last edited by Hack; Dec 29th, 2005 at 11:13 AM.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Connect CR 8.5 To SQL Server

    Split from this thread.

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