This is a migrated thread and some comments may be shown as answers.

Value of type Parameter cannot be converted to Parameter

1 Answer 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Caleb
Top achievements
Rank 1
Caleb asked on 26 Jun 2020, 05:14 PM

I'm getting an error when passing a parameter to a report programmatically.

Data source is embedded in report definition. I was using a default parameter value, also embedded in the definition. Now I'm trying to change it with the following code, but getting an error:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load

        Dim p1 As New Telerik.Reporting.Parameter With {.Name = "AGClientID", .Value = "1111"}

        ReportViewer1.ReportSource.Parameters.Add(p1)

    End Sub

 

Error is: Value of type 'Parameter' cannot be converted to 'Parameter'

 

 

1 Answer, 1 is accepted

Sort by
0
Caleb
Top achievements
Rank 1
answered on 26 Jun 2020, 05:22 PM

I had the wrong type... I needed this:

 

Dim p1 As New Telerik.ReportViewer.Html5.WebForms.Parameter With {.Name = "AGClientID", .Value = "1111"}

Tags
General Discussions
Asked by
Caleb
Top achievements
Rank 1
Answers by
Caleb
Top achievements
Rank 1
Share this question
or