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

WPF Report Viewer events fires twice

3 Answers 119 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aleksey
Top achievements
Rank 1
Veteran
Iron
Aleksey asked on 31 Oct 2019, 09:08 AM
When WPF Report Viewer inside other control (e.g. TabControl) all events (PrintBegin, PrintEnd, ExportBegin, ExportEnd etc.) fires twice, because Loaded event fires twice and you call AttachModelEventHandlers method also twice.

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 05 Nov 2019, 08:38 AM

Hello Aleksey,

Thank you for elaborating on this issue. I have reproduced it and logged it for further research. As a token of gratitude I have updated your Telerik points.

Regards,
Peter
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Heiko
Top achievements
Rank 1
Iron
Veteran
answered on 30 Nov 2020, 02:22 PM

Hello Peter,

any news on that issue? I have spent a full day trying to find a bug in my programming until I came across this thread. Is there any workaround so the events don't get fired twice?

Regards
Heiko

0
Neli
Telerik team
answered on 03 Dec 2020, 11:13 AM

Hi Heiko,

I am really sorry for the inconvenience this issue causes you and I completely understand that this could bring a negative impact on your work.  I converted the internal bug report into a public one- WPF Report Viewer events fires twice and I increased its priority. I also voted for it on your behalf, so when there is an update on the status you will receive a notification.

I also discussed the case with one of our developers, however, I am afraid that currently, we can not provide a workaround for the problem.

Please, let us know if you have any questions.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Nathan
Top achievements
Rank 1
Iron
commented on 03 Nov 2021, 03:46 PM

Hi

This workaround/hack works for me:

DateTime lastTimeCalled; private void ReportViewer_InteractiveActionExecuting(object sender, InteractiveActionCancelEventArgs args) {

// if method was called within the last second, return

var now = DateTime.Now; if ((now - lastTimeCalled) < TimeSpan.FromSeconds(1)) return; lastTimeCalled = now; if (args.Action is CustomAction customAction) { // my code here } }

Thank you
Tags
General Discussions
Asked by
Aleksey
Top achievements
Rank 1
Veteran
Iron
Answers by
Peter
Telerik team
Heiko
Top achievements
Rank 1
Iron
Veteran
Neli
Telerik team
Share this question
or