错误20599无法使用VB6 / Crystal报表打开SQL Server

时间:2016-05-25 08:32:06

标签: crystal-reports vb6 odbc

我一直在尝试使用以下Visual Basic代码浏览基于SQL Server数据库的Crystal Reports版本8:

CrystalReport1.ReportFileName = "C:\Report1.rpt"
CrystalReport1.Destination = crptToWindow
CrystalReport1.DiscardSavedData = True
CrystalReport1.WindowState = crptMaximized
MsgBox "Ok!", vbInformation
CrystalReport1.Action = 1

我正在使用Crystal Reports控件。报告的数据库是ODBC datasource连接到SQL Server。没有DiscardSavedData这可行,但它显示旧数据。使用DiscardSavedData,我收到错误消息:

  
      
  • 错误20599无法打开SQL Server。
  •   

如何解决这个问题?

0 个答案:

没有答案