T
tfsmag
So I used the code directly from the msdn site at
http://msdn2.microsoft.com/en-us/li...ting.webforms.serverreport.setparameters.aspx
here is my exact code
--code--
Private Sub SetReportParameters()
Dim p As New ReportParameter("userid",
Security.GetUserID().ToString())
ReportViewer1.ServerReport.SetParameters(p)
End Sub
--code--
When I use that Sub it returns this error...
--error--
Unable to cast object of type
'Microsoft.Reporting.WebForms.ReportParameter' to type
'System.Collections.Generic.IEnumerable`1[Microsoft.Reporting.WebForms.ReportParameter]'.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object
of type 'Microsoft.Reporting.WebForms.ReportParameter' to type
'System.Collections.Generic.IEnumerable`1[Microsoft.Reporting.WebForms.ReportParameter]'.
--error--
Any help is greatly appreciated.
http://msdn2.microsoft.com/en-us/li...ting.webforms.serverreport.setparameters.aspx
here is my exact code
--code--
Private Sub SetReportParameters()
Dim p As New ReportParameter("userid",
Security.GetUserID().ToString())
ReportViewer1.ServerReport.SetParameters(p)
End Sub
--code--
When I use that Sub it returns this error...
--error--
Unable to cast object of type
'Microsoft.Reporting.WebForms.ReportParameter' to type
'System.Collections.Generic.IEnumerable`1[Microsoft.Reporting.WebForms.ReportParameter]'.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object
of type 'Microsoft.Reporting.WebForms.ReportParameter' to type
'System.Collections.Generic.IEnumerable`1[Microsoft.Reporting.WebForms.ReportParameter]'.
--error--
Any help is greatly appreciated.