我正在尝试处理本地报告,但在设置参数中出现错误。这是示例代码。
r.ProcessingMode = ProcessingMode.Local
Dim lr As LocalReport = r.LocalReport
lr.ReportEmbeddedResource = "Gy.Report1.rdlc"
'笔记报告为空白。
Dim dss As New DataSet
Dim daa As New SqlDataAdapter("select * from c_inventory", cn)
cn.Open()
daa.Fill(dss, "c_inventory")
cn.Close()
Dim dss1 As New ReportDataSource
dss1.Name = "c_inventory"
dss1.Value = dss.Tables("c_inventory")
lr.DataSources.Add(dss1)
r.RefreshReport()
'Create a report parameter for the sales order number
Dim rpfilled As New ReportParameter()
rpfilled.Name = "filled"
rpfilled.Values.Add("0")
Dim param() As ReportParameter = {rpfilled}
lr.SetParameters(param)