1
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 数据库)中使用 SSRS 报告。报表查看器正在查看但显示错误“未指定报表定义的来源”。请帮助我。上面是我的确切代码。

4

0 回答 0