After upgrading to Q1 2013 of Reporting my parameter code does not work. I'm getting parameter values in NeedDataSource in order to construct my report/chart datasource. This code used to work:
After the upgrade the parameter values are not the values that I have entered in the UI, then previewing. I tried changing the code to:
With this code the values of report.Parameters["xxxx"].Value are the new expected values, but setting them to a string variable results in:
The name 'siteParm' does not exist in the current context
The name 'timespanParm' does not exist in the current context
Why is this?
Also, with my Chart page if I try:
Telerik.Reporting.Processing.Chart chart = (Telerik.Reporting.Processing.Chart)sender;
then chart has no Parameters property! How do I get the parameters then?
Dan
private void report_NeedDataSource(object sender, EventArgs e)
{
String siteParm = this.ReportParameters["Site"].Value.ToString().Trim();
Int32 timespanParm = Convert.ToInt32(this.ReportParameters["TimeSpan"].Value.ToString());
After the upgrade the parameter values are not the values that I have entered in the UI, then previewing. I tried changing the code to:
private void report_NeedDataSource(object sender, EventArgs e)
{
Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
string siteParm = report.Parameters["Site"].Value.ToString();
string timespanParm = report.Parameters["TimeSpan"].Value.ToString();
With this code the values of report.Parameters["xxxx"].Value are the new expected values, but setting them to a string variable results in:
The name 'siteParm' does not exist in the current context
The name 'timespanParm' does not exist in the current context
Why is this?
Also, with my Chart page if I try:
Telerik.Reporting.Processing.Chart chart = (Telerik.Reporting.Processing.Chart)sender;
then chart has no Parameters property! How do I get the parameters then?
Dan