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:
' DBName = BudgetBlinds3.mbd ' Table = M_Receipt ' Crystal Report File = Receipt.rpt Private Sub Command1_Click() With CrystalReport1 .WindowShowZoomCtl = True .WindowControlBox = False .PageZoom (200) .WindowShowExportBtn = True .WindowShowPrintBtn = True .WindowShowPrintSetupBtn = True .WindowShowRefreshBtn = True .WindowShowCloseBtn = True .WindowShowGroupTree = False .WindowState = crptMaximized .PageZoom (200) .WindowTitle = "Report Title " .ReportFileName = "D:\DS Project\ProjectVB\Tests\TestCrystal\Receipt.rpt" .Connect = "D:\DS Project\ProjectVB\Tests\TestCrystal\BudgetBlinds3.mdb" .RetrieveDataFiles .Action = 1 End With End Sub
Edit: Added [vbcode][/vbcode] tags for clarity. - Hack
![]()




Reply With Quote