New to Telerik Reporting? Download free 30-day trial

How to integrate Telerik Reporting in UWP application

Environment

Product Progress® Telerik® Reporting

Description

Utilizing reporting solution in UWP both with a WebView with integrated fully functional Telerik HTML5 Report Viewer and creating report document by invoking Telerik Reporting REST Service endpoints.

Solution

Download the example projects from this link or review the GitHub report. The projects require the latest official Telerik Reporting R2 2020 or later.

The solution contains 5 projects:

  1. Common (Universal Windows Class Library) - contains Utilities that are used in the other projects.

  2. RuntimeComponent (Universal Window) - contains native Windows Runtime object that is provided to the viewer.html as a global parameter in the context of the top-level document inside of a WebView. For more information on the approach see WebView.AddWebAllowedObject(String, Object) Method..

  3. ReportingServiceHost (ASP.NET Core project) - hosts a Telerik Reporting REST Service, that renders the report documents and viewer.html that contains an HTML5 Report Viewer with handled ExportEnd and PrintEnd events in which I am invoking a Native Runtime Component methods to handle the print and export on the UWP side. This project is required from the other projects and needs to start with any other project. In production, this should be hosted on a server to serve the report documents to the viewer or other service clients.

  4. ReportViewer (Universal Window) - hosts a WebView that renders the viewer.html and provides the Native Runtime Component to the JS side.

  5. ServiceClient - a simple client for the Telerik Reporting REST service to export a PDF document on a button click.

See Also

In this article