Hello there. I am using Visual studio 2005 and am trying to create a report with parameters. The report gets the data from a access 2003 database. Basically what happens is I have a reportviewer on my form. After the report runs, I have a textbox where a person can enter a date.
When I run the project I get an error in my code that says "InvalidCastException was unhandled. Unable to cast object of type 'microsoft.winforms.reportparameter' to type 'system.collections.generic.ienumericable `1 [Microsoft.reporting.winforms.reportparameter]'. Here is my code Below on the button click"
Private
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickDim parameters As ReportParameter
Dim para As DateTime = TextBox1.Text
parameters = New ReportParameter("Dated", para) Me.ReportViewer1.LocalReport.SetParameters(parameters)
ReportViewer1.RefreshReport()
End Sub"Dated" is the Parameter that I call in my report. when I look at "Parameters" in the me.reportviewer1.localreport... it comes up as "Dated"
Any suggestions Thanks nick

Using parameters in Local Mode
Babu Krisnaswamy-MSFT
SaravananK
ReportViewer1.RefreshReport()
This is the code that I am using now. It works perfectly.
Haowell