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

"Black magic" after Telerik's upgrade

1 Answer 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Андрей
Top achievements
Rank 1
Андрей asked on 06 Nov 2017, 05:05 PM

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.

1 Answer, 1 is accepted

Sort by
0
Андрей
Top achievements
Rank 1
answered on 08 Nov 2017, 09:39 AM
It's easier to leave the previous version than update to a new one. This post is no longer relevant, remove it.
Tags
General Discussions
Asked by
Андрей
Top achievements
Rank 1
Answers by
Андрей
Top achievements
Rank 1
Share this question
or