I m having a problem in a report that i created it didnt display any records when i run the form. It only displays that column name. I
m。 。如何使用Microsoft Report Viewer在報表查看器中顯示Recos
thnks你的幫助^^
I m having a problem in a report that i created it didnt display any records when i run the form. It only displays that column name. I
m。 。如何使用Microsoft Report Viewer在報表查看器中顯示Recos
thnks你的幫助^^
我想你錯過了一些代碼,您沒有指派和數據源到報表,試試這個行添加到您的代碼:
Me.BindingSource1.DataSource = Me.LMSDataSet.tblBookList
Dim rds As New ReportDataSource("DataSet1", Me.BindingSource1)
Me.ReportViewer1.LocalReport.ReportPath = "C:\yourreport.rdlc"
Me.ReportViewer1.LocalReport.DataSources.Clear()
Me.ReportViewer1.LocalReport.DataSources.Add(rds)
Me.ReportViewer1.RefreshReport()
那裏有一個錯誤,它說:DataSources不是'Microsoft.Reporting.WinForms.ReportViewer'的成員。 – user3187309
你使用wizerd來生成數據集 –
是的,先生我正在使用嚮導 – user3187309
你是怎麼嘗試?謹慎地展示一些代碼。 –
'TODO:這行代碼將數據加載到'LMSDataSet.tblBookList'表中。您可以根據需要移動或移除它。 (Me.LMSDataSet.tblBookList) Me.ReportViewer1.RefreshReport() – user3187309
sir您怎麼看? – user3187309