SetParameters - 本地报告处理期间发生错误

时间:2017-11-06 23:42:41

标签: vb.net parameters report

这是代码:

    Dim ddate As New ReportParameter("date", StocksReports.ddate)
    Dim tdate As New ReportParameter("datetwo", StocksReports.tdate)
    Dim cname As New ReportParameter("cashier", StocksReports.cashier)


    Dim sheetParams As ReportParameter() = {ddate, tdate, cname}
    For Each params As ReportParameter In sheetParams
        ReportViewerstocks.LocalReport.SetParameters(sheetParams)
    Next

我有2个报告,即销售和库存。在销售形式中,代码运行没有错误,但每当我运行股票表格时,我都会收到此错误:本地报表处理期间发生错误。这行代码中的错误:

ReportViewerstocks.LocalReport.SetParameters(sheetParams)

感谢任何帮助。谢谢。

2 个答案:

答案 0 :(得分:0)

更改此行

 Dim sheetParams As ReportParameter() = {ddate, tdate, cname}

到这一行

 Dim sheetParams() As ReportParameter = {ddate, tdate, cname}

答案 1 :(得分:0)

我认为您需要在程序中检查class Destroyable {//....... public: bool isDestroyed(); //......... };

reportpath
check path
check path