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

Accessing ReportParameters from code

1 Answer 21 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Justin Lee
Top achievements
Rank 1
Justin Lee asked on 27 Mar 2013, 02:25 PM
I have a number of reports (in asp.net).  Some of the reports construct the datasource manually in the NeedDataSource event.  I recently upgraded from Q2 2011 to Q3 2013.  Now when I run a report and select parameters, the report parameters' values do not reflect the choices selected. (they are either the initial value of the parameter, or NULL if there was no initial value) 

I am getting the parameter values via:  this.ReportParamaters["paramName"].Value.

What has changed in this area since Q2 2011, and what can I do to access the parameters in the NeedDataSource event?

Thanks,
Justin

1 Answer, 1 is accepted

Sort by
0
Justin Lee
Top achievements
Rank 1
answered on 27 Mar 2013, 02:56 PM
I was able to resolve the issue by doing the following:

private void CapabilityListReport_NeedDataSource(object sender, EventArgs e)
{
  var report = (Telerik.Reporting.Processing.Report)sender;
  object value = report.Parameters["paramName"].Value;
   
  ...
}
Tags
General Discussions
Asked by
Justin Lee
Top achievements
Rank 1
Answers by
Justin Lee
Top achievements
Rank 1
Share this question
or