Value of type Parameter cannot be converted to Parameter

2 posts, 0 answers
  1. Caleb
    Caleb avatar
    2 posts
    Member since:
    Jun 2020

    Posted 26 Jun 2020 Link to this post

    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'

     

     

  2. Caleb
    Caleb avatar
    2 posts
    Member since:
    Jun 2020

    Posted 26 Jun 2020 in reply to Caleb Link to this post

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

     

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

Back to Top