Hello!
I have a
Silverlight application that uses Telerik reporting. Also this application uses
Microsoft Prims.
After
upgrading from current version of Telerik (6.0.12.215, Q1 2012 Visual Studio
2011 Refresh) to newer (11.1.17.614, R2 2017) issues occurred.
After minor
changes in source code (correcting to use right namespaces) solution builds
fine, even runs fine, but reports shows nothing useful (no values in
parameter-binding fields). So, parameters now do not passes to reports.
This is some source code.
protected void NavigateToPermissionReport()
{
string navigationSource = AppPages.PermissionReportView + "?" +
string.Join("&", this.Parameters.Select(parameter => string.Format("{0}={1}", parameter.Key, parameter.Value)));
this.EventAggregator.GetEvent<NavigateToPageEvent>().Publish(true);
this.RegionManager.RequestNavigate(AppRegions.NavigationRegion, navigationSource);
}
After this piece of code “black magic” happen and execution comes directly to report’s code:
private void OnPermissionItemDataBinding(object sender, EventArgs e)
{
this.ItemDataBinding -= this.OnPermissionItemDataBinding;
this.BeginGetPermission(this.ReportParameters);
}
private void BeginGetPermission(ReportParameterCollection parameters){
PermissionViewModel viewModel = new PermissionViewModel();
viewModel.LoadData(parameters);
this.DataSource = new ObjectDataSource(viewModel, string.Empty);
}
What happens
between these parts of the code I can’t figure out.
So, before upgrading, parameters in ReportParameterCollection had the same values as in navigationSource, but after, parameters became null.
Why this can
happen?
Thanks.