this is the code:

```
    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

```

I have 2 reports which is sales and stocks. In sales form the code runs without error but whenever I run stocks form, I get this error: An error occurred during local report processing. The error in this line of code:

```
ReportViewerstocks.LocalReport.SetParameters(sheetParams)

```

Any help is appreciated. Thank you.