In Development
Last Updated: 11 Nov 2025 13:45 by ADMIN
Matthew
Created on: 05 Nov 2025 15:30
Category: Reporting
Type: Bug Report
1
The WPF report viewer attaches the event handlers to the model multiple times

The Initialize method in ReportViewer.cs is called from both the OnLoaded and OnApplyTemplate methods, which in turn calls the AttachModelEventHandlers method. This leads to it adding the event handlers to the model twice every time it is loaded. The DetachModelEventHandlers is only called once (in the OnUnloaded method), so if you keep unloading and reloading the control, it adds 2 event handler invocations but removes only one. This means each one is called at least twice (if you have only loaded the control once), then 3, 4, 5, etc times if you keep unloading and reloading it.

I've worked around this by adding code to my wrapper class to prune the duplicated handlers for now, but this needs fixing in the base code.

1 comment
ADMIN
Dimitar
Posted on: 11 Nov 2025 13:45

Hello Matthew,

Thank you for the feedback!

Indeed, the WPF Report Viewer, currently, subscribes to events on both the "loaded" and "onapplytemplate" events, which causes double subscription.

We are already working on the problem, and even though the fix won't come with the 2025 Q4 release scheduled for this week, it will be included in the very next release after Q4.

As a reward for reporting this problem to us in such detail, we have updated your Telerik points as well!

Thank you for using Teleirk Reporting!

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.