Unable to see the Report Viewer Component

1 Answer 38 Views
Report Viewer - Blazor
Peter
Top achievements
Rank 1
Iron
Iron
Iron
Peter asked on 24 Aug 2024, 08:52 PM

Hello Telerik,

I am following the Telerik Virtual Classroom course for Telerik Reporting.  At the end of the Hosting an API Endpoint section the teacher runs the app and sees the Report Viewer Container.   When I launch the app (without errors) I do not see this report container on the Reports.razor page.

Thank you for your assistance.

@page "/report"
@using Telerik.ReportViewer.Blazor

<style>
    .trv-report-viewer {
        width: 100%;
        height: 880px;
    }
</style>
Testing Outside of Div
<div class="dashboard">
    Testing inside of Div
    <ReportViewer ViewerId="rv1"
                  ServiceUrl="api/reports"
                  ReportSource="@(new ReportSourceOptions
                                  {
                                      Report = "rps_dashboard_report.trdp"
                                  })"
                  />

</div>


<link href="css/dashboard.css" rel="stylesheet" />

@code {

}

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Aug 2024, 12:07 PM

Hello, Peter,

After following the steps in Chapter 3 and applying the changes to the referred project, RPS Tracker project (version one of the application we will be modifying), I would like to note that it is necessary to upgrade the Target Framework. It is required because the "RPS.Web.Server" project is a .NET Core 3.1 application but we dropped support for this framework with the R3 2023 (17.2.23.1010) release. I suggest upgrading the target framework of the project to .NET 6 or later:

I have also installed the latest version of the Telerik Reporting and Telerik UI for Blazor:

This is the observed result on my end when running the project:

I used the same code snippet for the Report.razor page as the previously provided one. I have also attached my sample project for your reference. Please give it a try and see how it works on your end.

Please let me know if you are observing a different result on your side.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Peter
Top achievements
Rank 1
Iron
Iron
Iron
commented on 30 Aug 2024, 04:33 PM | edited

Thank you for your response Dess.  I download your .zip file and changed to net8.0 and installed the Telerik Packages.

It looks like it's not navigating to the Reports Page.  Please note that I deleted the WebAssembly Project because I was getting errors.

Also, is it possible to use Telerik Reports with Blazor Web Apps or is it required we use Blazor Server App?


Dess | Tech Support Engineer, Principal
Telerik team
commented on 04 Sep 2024, 02:22 PM

Hi, Peter,

I downloaded the attached zip from my previous reply and changed the target framework for the RPS.Web.Server.csproj to .NET 8. No other changes were made and the solution was successfully run. When navigating to the Report page, the viewer seems to be properly loaded on my end:

After unloading the project RPS.Web.WASM and rebuilding the entire application, the report from the Server project is loaded as expected: 

These are the installed NuGet packages on my end together with the respective used version:

I have attached the modified version of the project. Please give it a try and let me know how it works on your end.

The ReportViewer can be hosted in any Blazor project. However,  for the REST service itself we can guarantee it is properly functioning in the Server project.

I have checked your license and since you have an active license for the UI for Blazor product, I would recommend you to have a look at our Native Blazor Report Viewer which is a native Blazor component that can be used in Blazor applications.

Should you have further questions please let me know.

Tags
Report Viewer - Blazor
Asked by
Peter
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or