Public Sub StudentList(ByVal CourseID As String, ByVal SY As String)
RptVwer.Reset()
RptVwer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
RptVwer.LocalReport.ReportPath = Environment.CurrentDirectory + "\StudentList.rdl"
Dim paramList As New Generic.List(Of ReportParameter)
paramList.Add(New ReportParameter("fxKeyCourseID", CourseID, False))
paramList.Add(New ReportParameter("fxKeySchoolYear", SY, False))
RptVwer.LocalReport.SetParameters(paramList)
Dim dsSummary As DataSet = modReport.StudentList_sp(CourseID, SY)
Dim rDs As ReportDataSource = New ReportDataSource("DataSet1", dsSummary.Tables(0))
RptVwer.LocalReport.DataSources.Clear()
RptVwer.LocalReport.DataSources.Add(rDs)
RptVwer.ServerReport.Refresh()
RptVwer.RefreshReport()
End Sub
我在vb.net 2010(sql server database)中使用SSRS报告。报表查看器正在查看但显示错误“未指定报表定义的来源”。请帮帮我。以上是我的确切代码。