Paramer Value is not being Set

2 posts, 0 answers
  1. Boris
    Boris avatar
    7 posts
    Member since:
    Apr 2014

    Posted 17 Sep 2018 Link to this post

    Hi There

    I have this code:

                    var typeReportSource = new Telerik.Reporting.TypeReportSource();
                    typeReportSource.TypeName = fullReportType;

                    var parameter = new Telerik.Reporting.Parameter();
                    parameter.Name = "ID"
                    parameter.Value = "12345"

                    typeReportSource.Parameters.Add(parameter);

                    ReportViewer1.ReportSource = typeReportSource;
                    ReportViewer1.RefreshReport();

     

    and i get an eather empty reports or an error

    An error has occurred while processing Report 'Option1perJob':
    Conversion from string "" to type 'Integer' is not valid.
    ------------- InnerException -------------
    Input string was not in a correct format

     

    While debugging I see that Parameter is not being set to Value and remains empty.

    Please Help.

    Thank you,

  2. Boris
    Boris avatar
    7 posts
    Member since:
    Apr 2014

    Posted 17 Sep 2018 Link to this post

    found a problem, i had to do :       

    Dim processingReport = CType(sender, Processing.Report)
    Dim Id = processingReport.Parameters("ID").Value
Back to Top