如何在报表查看器中显示Recos

时间:2014-01-12 13:03:46

标签: vb.net

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使用微软报告查看器。

向你寻求帮助^。^

1 个答案:

答案 0 :(得分:0)

我认为您错过了一些您未分配的代码和数据源到您的报告,请尝试将此行添加到您的代码中:

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()