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

Paramer Value is not being Set

1 Answer 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 17 Sep 2018, 05:05 PM

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,

1 Answer, 1 is accepted

Sort by
0
Boris
Top achievements
Rank 1
answered on 17 Sep 2018, 07:29 PM
found a problem, i had to do :       

Dim processingReport = CType(sender, Processing.Report)
Dim Id = processingReport.Parameters("ID").Value
Tags
General Discussions
Asked by
Boris
Top achievements
Rank 1
Answers by
Boris
Top achievements
Rank 1
Share this question
or