Completed
Last Updated: 11 May 2022 10:26 by ADMIN
Release R2 2022
Mirzodaler
Created on: 06 Apr 2022 06:37
Type: Bug Report
3
WinUI3 Telerik Report Viewer: Navigate to URL in new window is not working

Issue #1: In WinUI3, for Telerik Report Viewer, when we have a link to URI to open in a new window, it is not working correctly.

Here is a setting in a demo report (Report Catalog): 

When clicking to link in control on runtime, we are getting the following error:

This looks like a bug.

 

Issue #2: Our scenario is the following: We will have some custom links in a report like, "MyApp:Customer/TEST". When we click on that, we need to send that link to our WinUI app, which will let's say navigate to a Customer page after it is clicked in a report. Due to Issue #1, we were not able to test it. Even when Issue #1 is resolved, what is a good way for us to handle the current scenario? I don't want to refresh the report when some link is clicked.

 

Issue #3. We might have the HTML Text box in a report. When it has a link, it is not clickable. This is another item that looks like a bug.

 

Can you please help to resolve these 3 issues?

Thanks,

 

3 comments
ADMIN
Ivan Hristov
Posted on: 11 May 2022 09:59

Hi all,

The issue with the non-executing NavigateToURL actions in WinUI and WPF viewers is fixed and will be included in the 2022 R2 release, which is due today. The core of the problem was the changed default value of the UseShellExecute property in .NET Core apps. In .NET Framework the default value was true, but in .NET Core the default value is false, which effectively prevents finding the application that will open the provided URL (the default browser on the machine).

As for the second question, if you need additional flexibility on processing the executed actions, you can use the report viewer events, as explained in the How to add interactivity to a report using action event handlers in WPF Report Viewer article. The WPF and WinUI report viewers share lot of common code so the described approach can be used in WinUI apps as well. Here's a sample code that shows how to handle the NavigateToUrlAction and execute some custom code instead of navigating to the target location:

        public MainWindow()
        {
            this.InitializeComponent();
            this.Title = "Telerik Reporting WinUI .NET 5 Demo";

            this.reportViewer.InteractiveActionExecuting += (s, e) =>
            {
                if (e.Action is Telerik.Reporting.Processing.NavigateToUrlAction)
                {
                    e.Cancel = true;
                    System.Diagnostics.Debug.WriteLine($"Action on item {e.Action.ReportItemName} was canceled.");
                }
            };
        }

 

As for the issue 3: The <a> links in the HTMLTextBox item are not rendered as actions by design. As mentioned in the corresponding HTMLTextBox article: 

The HyperLink (<a> tag) is interactive (acts as an actual hyperlink) only under an HTML rendering extension. To add links in PDF, XLSX, DOCX, PPTX files and HTML, XAML, IMAGE renderings for the different Report Viewers, you can use a Hyperlink Action.

I hope the provided information will help you to resolve your problems. If you need further assistance, please do not hesitate to open a support ticket and we'll do our best to help.

Regards, Ivan Hristov

ReportingTeam

ADMIN
Neli
Posted on: 08 Apr 2022 14:48

Hi Glenn and Mirzodaler,

We were able to reproduce the issue. For that reason, we converted this ticket to a bug report. As a token of gratitude, I updated your Telerik points.

Once there is update on the status, you will receive a notification.

Regards,
Neli
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Glenn
Posted on: 07 Apr 2022 13:15
We will not be able to use the WinUI control without resolving this problem.