2010-03-30 51 views
2

的成員,但仍然試圖解決這個問題。我需要你的幫助。林具有以下錯誤消息:Databind'不是'CrystalDecisions.Windows.Forms.CrystalReportViewer'

Databind' is not a member of 'CrystalDecisions.Windows.Forms.CrystalReportViewer' 

在我的代碼:

昏暗RPT作爲新CrystalReport1() 昏暗噠作爲新SQLiteDataAdapter 昏暗DS作爲新presbydbDataSet

 'Dim cmd As New SQLiteCommand("SELECT personal_details.fn, training.training_level FROM personal_details INNER JOIN training ON Staff_ID WHERE personal_details.staff_ID='" + detailsFrm.Label13.Text + "'", conn) 




Dim cmd As New SQLiteCommand("SELECT * FROM personal_details WHERE personal_details.staff_ID='" + detailsFrm.Label13.Text + "'; SELECT * FROM training WHERE training.staff_ID='" + detailsFrm.Label13.Text + "'", conn) 
     cmd.ExecuteNonQuery() 
     da.SelectCommand = cmd 
     da.Fill(ds) 
     rpt.SetDataSource(ds) 
     rpt.Subreports.Item("personal_detailsRpt").SetDataSource(ds.Tables("personal_details")) 
     rpt.Subreports.Item("trainingRpt").SetDataSource(ds.Tables("training")) 
     CrystalReportViewer1.ReportSource = rpt 
     CrystalReportViewer1.DataBind() 

即時通訊使用vb.net和這些是進口我使用:

Imports System.Data.SQLite 
Imports System.Configuration 
Imports CrystalDecisions.CrystalReports.Engine 
Imports CrystalDecisions.ReportAppServer 

請問我該如何擺脫這個錯誤?謝謝回答

回答

0

Windows窗體CrystalReportViewer類沒有DataBind方法 - 只需刪除該行,它應該可以工作。

DataBind通常與ASP.NET控件一起使用。