xtrareports-403912-web-reporting-blazor-reporting-native-report-viewer-get-started-blazor-web-app-microsoft.md
This section describes how to create a new Blazor project. If you want to start this tutorial using an existing application, go to Step 2.
Click Create a new project on Visual Studio’s start page and select the Blazor Web App template. Select Server from the Interactive Render Mode drop-down list.
Specify the project name and location, and click Next.
Specify additional options and click Create.
For additional information on available Blazor templates, refer to the following topic: Tooling for ASP.NET Core Blazor.
Install a NuGet package for the Blazor Report Viewer:
Select Tools → NuGet Package Manager → Manage NuGet Packages for Solution.
Once the dialog appears, open the Browse tab, select the DevExpress 25.2 Local package source, and install the following NuGet package:
Build the project.
Refer to the following help topic for more information: Install NuGet Packages in Visual Studio, VS Code, and Rider.
In the _Imports.razor file, register the DevExpress.Blazor namespace:
Register scripts required by DevExpress components: open the App.razor file and call the DxResourceManager.RegisterScripts method.
Register the services required for Blazor Reporting, and specify endpoint routing. For this, call the AddDevExpressServerSideBlazorReportViewer method in the Program.cs file:
Apply a theme in the Components/App.razor project file.
Create a new file (ReportViewer.razor) in the Pages folder.
Add a navigation link to the NavMenu.razor page:
Run the project. When the browser opens the application, navigate to the Viewer page:
Create a report class and pass an instance of this class to the viewer.
To perform this step, you should install DevExpress Reporting v25.2 on your machine. Refer to the following topic for more information: Run the Installation Wizard - DevExpress Unified Component Installer.
Select Project -> Add New Item… to invoke the Add New Item dialog. Navigate to the Reporting node and select the DevExpress v.25.2 Report item template.
Select Blank in the invoked Report Wizard page and click Finish.
Modify the newly created report in the Visual Studio Report Designer. Add a label and type Hello, World!:
Click the report’s smart tag and select Save… :
Specify the report that the Report Viewer displays in the ReportViewer.razor page:
Run the project and see the result.
Load a ReportTopic describes how to load predefined reports and load reports from REPX files.Restore Data ConnectionsTopic describes how to implement a service that resolves a SQL/JSON connection name to a valid connection.Specify Report ParametersTopic describes how to specify report parameters using the built-in Parameters Panel or create custom UI elements and use them to submit parameter values to the report.Customize the Report Viewer
Review the following topics for information on how to customize the UI:
TroubleshootingTopic lists common issues that can occur in a Web Reporting application and describes solutions. For information on how to identify the cause of an issue, refer to the following topic: Reporting Application Diagnostics.