Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

setting report viewer parameters

$
0
0

I'm trying to set a parameter on a report im calling in asp.net but I keep getting, can anyone help me with this ? it driving me nuts.

"System.InvalidCastException: Unable to cast object of type 'Microsoft.Reporting.WinForms.ReportParameter[]' to type 'System.Collections.Generic.IEnumerable`1[Microsoft.Reporting.WebForms.ReportParameter]'."

1 is the value I'm trying to load but I get the same error each time.

        Dim Param1 As New ReportParameter
        Param1.Name = "person"
        Param1.Values.Add(1)
        ReportViewer4.ServerReport.SetParameters(New ReportParameter() {Param1})


Viewing all articles
Browse latest Browse all 1418

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>