Hello out there,

I am using VB6, Crytal Reports 8.5 and Access 2003. The following is the code i have done and keep on getting error 20599 "Cannot open SQL Server". What is happening. Also if i substitute relative paths for the absolute paths of my Databse and Crytal Report files i get "Invalid File Name".

This is the code i am using :
VB Code:
  1. ' DBName = BudgetBlinds3.mbd
  2. ' Table = M_Receipt
  3. ' Crystal Report File = Receipt.rpt
  4.  
  5. Private Sub Command1_Click()
  6.  
  7. With CrystalReport1
  8.    .WindowShowZoomCtl = True
  9.    .WindowControlBox = False
  10.    .PageZoom (200)
  11.    .WindowShowExportBtn = True
  12.    .WindowShowPrintBtn = True
  13.    .WindowShowPrintSetupBtn = True
  14.    .WindowShowRefreshBtn = True
  15.    .WindowShowCloseBtn = True
  16.    .WindowShowGroupTree = False
  17.    .WindowState = crptMaximized
  18.    .PageZoom (200)
  19.    .WindowTitle = "Report Title "
  20.    .ReportFileName = "D:\DS Project\ProjectVB\Tests\TestCrystal\Receipt.rpt"
  21.    .Connect = "D:\DS Project\ProjectVB\Tests\TestCrystal\BudgetBlinds3.mdb"
  22.    .RetrieveDataFiles
  23.        
  24.    .Action = 1
  25.    
  26. End With
  27.    
  28. End Sub


Edit: Added [vbcode][/vbcode] tags for clarity. - Hack