我正在尝试加载一个按 textbox1 中的名称过滤的报告,但我收到错误“尝试设置此报告中未定义的报告参数'名称'”有什么想法吗?
Dim ds As New TestDataSetTableAdapters.tblTestDataTableAdapter
' Create report data source
Dim ID As ReportParameter
ID = New ReportParameter("Name", TextBox1.Text)
Dim rds As New ReportDataSource("MyApplication_ModelObject", ObjectDataSource1)
' Clear the datasets in the report viewer and add the new datasource
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add(rds)
ReportViewer1.LocalReport.SetParameters(ID)
ReportViewer1.LocalReport.Refresh()