Migrate Report Viewer application
In our Bold Reports® new assemblies are introduced for both client and server-side to resolve the compatibility problem between Essential Studio Report Viewer versions. It has changes in both Web API service and client-side scripts.
This section provides step-by-step instructions for migrating Report Viewer from Syncfusion® Essential Studio release version to Bold Reports® version of ASP.NET Core Report Viewer application:
Client-side migration
-
To uninstall NuGet, right-click the project or solution in the Solution Explorer tab, and choose Manage NuGet Packages. Search the
Syncfusion.EJ.ASPNET.CoreNuGet Package and uninstall from your application. -
Search for
BoldReports.AspNet.CoreNuGet package, and install to your application.
Refer to the NuGet Packages section to learn more details about installing and configuring Report Viewer NuGet packages.
Scripts and CSS references
-
Remove the following scripts and CSS references from the Report Viewer
\Views\Shared\_Layout.cshtmlpage:ej.web.all.min.cssej.web.all.min.js
-
Add the listed references in the same order given in above list. You can replace the following code in your
\Views\Shared\_Layout.cshtmlpage<head>tag.<!-- Report Viewer component style --> <link href="https://cdn.boldreports.com/13.1.26/content/v2.0/tailwind-light/bold.report-viewer.min.css" rel="stylesheet" /> <!-- Report Viewer component dependent scripts --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script src="https://cdn.boldreports.com/13.1.26/scripts/v2.0/common/bold.reports.common.min.js"></script> <script src="https://cdn.boldreports.com/13.1.26/scripts/v2.0/common/bold.reports.widgets.min.js"></script> <!-- Report Viewer component script --> <script src="https://cdn.boldreports.com/13.1.26/scripts/v2.0/bold.report-viewer.min.js"></script> -
The component prefix has been changed from
ejtosf. -
Open the
\Views\Shared\_Layout.cshtmlpage. -
Remove the following code
<ej-script-manager></ej-script-manager>in your_Layout.cshtmlpage. -
Replace the following code in your
_Layout.cshtmlpage.<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>@ViewData["Title"] - ReportViewerDemo</title> <!-- Report Viewer component style --> <link href="https://cdn.boldreports.com/13.1.26/content/v2.0/tailwind-light/bold.report-viewer.min.css" rel="stylesheet" /> <!-- Report Viewer component dependent scripts --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script src="https://cdn.boldreports.com/13.1.26/scripts/v2.0/common/bold.reports.common.min.js"></script> <script src="https://cdn.boldreports.com/13.1.26/scripts/v2.0/common/bold.reports.widgets.min.js"></script> <!-- Report Viewer component script --> <script src="https://cdn.boldreports.com/13.1.26/scripts/v2.0/bold.report-viewer.min.js"></script> </head> <body> <div style="min-height: 600px;width: 100%;"> @RenderBody() </div> @RenderSection("Scripts", required: false) <!-- Bold Reports<sup>®</sup> script manager --> <bold-script-manager></bold-script-manager> </body> </html>
Adding data visualization scripts
To render the report with data visualization components such as chart, gauge, and map items, add scripts of the visualization element. The following table shows the script reference that needs to be added in Report Viewer page for data visualization elements.
| Visualization item | Script file |
|---|---|
| Gauge, Map, Chart | bold.reports.common.min.js |
The following code can be used to render the chart, gauge, and map report items in Report Viewer.
<!-- Report Viewer component style -->
<link href="https://cdn.boldreports.com/13.1.26/content/v2.0/tailwind-light/bold.report-viewer.min.css" rel="stylesheet" />
<!-- Report Viewer component dependent scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.boldreports.com/13.1.26/scripts/v2.0/common/bold.reports.common.min.js"></script>
<script src="https://cdn.boldreports.com/13.1.26/scripts/v2.0/common/bold.reports.widgets.min.js"></script>
<!-- Report Viewer component script -->
<script src="https://cdn.boldreports.com/13.1.26/scripts/v2.0/bold.report-viewer.min.js"></script>Tag helper
-
Remove following tag helper within the
_ViewImports.cshtmlpage.@using Syncfusion.JavaScript @addTagHelper *, Syncfusion.EJ -
Add following tag helper within the
_ViewImports.cshtmlpage.@using BoldReports.TagHelpers @addTagHelper *, BoldReports.AspNet.Core
Control initialization
-
The component prefix has been changed from
ej-report-viewertobold-report-viewer. -
Open the Report Viewer CSHTML page.
-
Replace the component tag
ej-report-viewertobold-report-viewer.<bold-report-viewer id="viewer"></bold-report-viewer>If your application contains Report Viewer initialization in multiple pages then replace in all the pages.
Server-side migration
-
To uninstall NuGet, right-click the project or solution in the Solution Explorer tab, and choose Manage NuGet Packages. Search the
Syncfusion.EJ.ReportViewer.ASPNET.CoreNuGet Package and uninstall from your application. -
Search for
BoldReports.Net.CoreNuGet package, and install to your application.Refer to the NuGet Packages section to learn more details about installing and configuring Report Viewer NuGet packages.
Web API Controller
-
The
IReportControllerinterface is moved toBoldReports.Web.ReportViewer. Open the Report Viewer Web API Controller file and remove the following using statement.using Syncfusion.EJ.ReportViewer; -
Add the following using statement.
using BoldReports.Web.ReportViewer; -
Your application is successfully upgraded to the latest version of Report Viewer, and you can run the application with new assemblies.