Search results
Suggest a FeaturePDF

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

  1. To uninstall NuGet, right-click the project or solution in the Solution Explorer tab, and choose Manage NuGet Packages. Search the Syncfusion.EJ.ASPNET.Core NuGet Package and uninstall from your application.

  2. Search for BoldReports.AspNet.Core NuGet 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

  1. Remove the following scripts and CSS references from the Report Viewer \Views\Shared\_Layout.cshtml page:

    • ej.web.all.min.css
    • ej.web.all.min.js
  2. Add the listed references in the same order given in above list. You can replace the following code in your \Views\Shared\_Layout.cshtml page <head> tag.

    <!-- Report Viewer component style -->
    <link href="https://cdn.boldreports.com/6.2.32/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/6.2.32/scripts/v2.0/common/bold.reports.common.min.js"></script>
    <script src="https://cdn.boldreports.com/6.2.32/scripts/v2.0/common/bold.reports.widgets.min.js"></script>
    
    <!-- Report Viewer component script -->
    <script src="https://cdn.boldreports.com/6.2.32/scripts/v2.0/bold.report-viewer.min.js"></script>
  3. The component prefix has been changed from ej to sf.

  4. Open the \Views\Shared\_Layout.cshtml page.

  5. Remove the following code <ej-script-manager></ej-script-manager> in your _Layout.cshtml page.

  6. Replace the following code in your _Layout.cshtml page.

    <!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/6.2.32/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/6.2.32/scripts/v2.0/common/bold.reports.common.min.js"></script>
        <script src="https://cdn.boldreports.com/6.2.32/scripts/v2.0/common/bold.reports.widgets.min.js"></script>
    
        <!-- Report Viewer component script -->
        <script src="https://cdn.boldreports.com/6.2.32/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 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/6.2.32/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/6.2.32/scripts/v2.0/common/bold.reports.common.min.js"></script>
<script src="https://cdn.boldreports.com/6.2.32/scripts/v2.0/common/bold.reports.widgets.min.js"></script>

<!-- Report Viewer component script -->
<script src="https://cdn.boldreports.com/6.2.32/scripts/v2.0/bold.report-viewer.min.js"></script>

Tag helper

  1. Remove following tag helper within the _ViewImports.cshtml page.

        @using Syncfusion.JavaScript
        @addTagHelper *, Syncfusion.EJ
  2. Add following tag helper within the _ViewImports.cshtml page.

        @using BoldReports.TagHelpers
        @addTagHelper *, BoldReports.AspNet.Core

Control initialization

  1. The component prefix has been changed from ej-report-viewer to bold-report-viewer.

  2. Open the Report Viewer CSHTML page.

  3. Replace the component tag ej-report-viewer to bold-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

  1. 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.Core NuGet Package and uninstall from your application.

  2. Search for BoldReports.Net.Core NuGet 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

  1. The IReportController interface is moved to BoldReports.Web.ReportViewer. Open the Report Viewer Web API Controller file and remove the following using statement.

    using Syncfusion.EJ.ReportViewer;
  2. Add the following using statement.

    using BoldReports.Web.ReportViewer;
  3. Your application is successfully upgraded to the latest version of Report Viewer, and you can run the application with new assemblies.