We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Starting in 2019, the Reporting control is no longer included in Essential Studio. If you're experiencing issues with the Syncfusion Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion and appreciate your understanding.

ReportViewer issue

I'm beginner in here. I want to show my rdl report from wwwroot/reports repository using report viewer. Please help me how should I do now?

9 Replies

MS Mahendran Shanmugam Syncfusion Team May 3, 2019 06:08 AM UTC

Hi Atiar, 
 
Thanks for your interest in our Syncfusion product. 
 
We can able to run the local RDL report from wwwroot folder in ASP.NET Core Report Viewer sample. Please find the below steps for how to create a ASP.NET Cor Report Viewer sample  
  
Index.cshtml:  
@page  
@model IndexModel  
@{  
    @ViewData["heading"];  
}  
  
<style>  
    bodyhtml#reportviewer {  
        overflowhidden !important;  
        height100%;  
        width100%;  
    }  
</style>  
  
<ej-report-viewer id="reportviewer1" report-service-url="../ReportApi" processing-mode="Remote" />  
<ej-script-manager></ej-script-manager>  
  
  
Index.cshtml.cs  
using Microsoft.AspNetCore.Mvc.RazorPages;  
  
namespace ReportViewerCore.Pages  
{  
    public class IndexModel : PageModel  
    {  
  
        public void OnGet()  
        {  
            ViewData["heading"] = "ReportViewer Sample";  
        }  
    }  
}  
  
  
ReportApiController.cs:  
ReportViewer needs WebApi controller for rendering the report as shown in below code snippet.  
  
using System;  
using System.Collections.Generic;  
using Microsoft.AspNetCore.Mvc;  
using Syncfusion.EJ.ReportViewer;  
using Microsoft.Extensions.Caching.Memory;  
using Microsoft.AspNetCore.Hosting;  
using System.IO;  
  
namespace ReportViewerCore.API  
{  
    public partial class ReportApiController : Controller, IReportController  
    {  
        private IMemoryCache _cache;  
        private IHostingEnvironment _hostingEnvironment;  
  
        public ReportApiController(IMemoryCache memoryCache, IHostingEnvironment hostingEnvironment)  
        {  
            _cache = memoryCache;  
            _hostingEnvironment = hostingEnvironment;  
        }  
  
        [HttpPost]  
        public object PostReportAction([FromBody] Dictionary<stringobject> jsonResult)  
        {  
            return ReportHelper.ProcessReport(jsonResult, thisthis._cache);  
        }  
  
        [ActionName("GetResource")]  
        [AcceptVerbs("GET")]  
        public object GetResource(ReportResource resource)  
        {  
            return ReportHelper.GetResource(resource, this, _cache);  
        }  
  
        [HttpPost]  
        public object PostFormReportAction()  
        {  
            return ReportHelper.ProcessReport(nullthisthis._cache);  
        }  
  
        public void OnInitReportOptions(ReportViewerOptions reportOption)  
        {  
            string basePath = _hostingEnvironment.WebRootPath;  
            FileStream reportStream = new FileStream(basePath + @"\ReportRDL\GroupingAgg.rdl", FileMode.Open, FileAccess.Read);  
            reportOption.ReportModel.Stream = reportStream;  
  
        }  
  
        public void OnReportLoaded(ReportViewerOptions reportOption)  
        {  
  
        }  
    }  
}  
  
  
We have prepared the sample with Razor page in ASP.NET Core and it can be downloaded from below location.  
  
Regards, 
Mahendran S. 



AR Atiar Rahman May 3, 2019 09:04 AM UTC

Thanks a lot but, How can I bind data from services (in report)? I'm using controller.


MS Mahendran Shanmugam Syncfusion Team May 3, 2019 10:55 AM UTC

Hi Atiar, 

We can able to pass the datasource values from code behind for RDL report when setting the processing mode as local. We have prepared the simple ASP.NET Core Report Viewer sample to load the report from passing the datasource in code behind and it can be downloaded from below location. 
 
Please find the below help documentation for passing the datasource value from code behind. 
 
Regards, 
Mahendran S. 



AR Atiar Rahman May 4, 2019 05:45 AM UTC

Thanks a lot. But now i got stuck in creating RDLC file that you have created and run. When I tried to create RDLC file in syncfusion report designer and tried to save, it shows only RDL file type, no RDLC type. 
How can I design RDLC report in Syncfusion Report Designer?


MS Mahendran Shanmugam Syncfusion Team May 6, 2019 08:42 AM UTC

Hi Atiar, 
 
We can able to create and edit the RDLC report in report designer. We have prepared the simple sample for your reference. 

Please find the below help documentation for your reference to create a RDLC report in report designer. 
 
Please find the below kb documentation for how to pass the Business object for RDLC report in report designer. 

Regards, 
Mahendran S. 



AR Atiar Rahman May 6, 2019 09:20 AM UTC

Thank you. I need to bind data from json or another service (not from Database) in RDLC report. What should I do?


MS Mahendran Shanmugam Syncfusion Team May 6, 2019 12:01 PM UTC

Hi Atiar, 

Please find the below kb documentation for how to pass the data for RDLC from code behind in report designer.  

Regards, 
Mahendran S. 



AR Atiar Rahman May 8, 2019 07:24 AM UTC

I have downloaded Syncfusion Essential Studio (ASP.Net Core) for Reporting. It mentioned that Server side deployment licenses are included. When I make a report on run on browser it works fine (doesn't show any message of trial version) but, when I deploy into Linux server it show that the report is build with trial version of Syncfusion. What should I do?


VS Vinoth Srinivasan Syncfusion Team May 8, 2019 07:38 AM UTC

Hi Atiar, 

If you are using the licensed build with development environment, then we will not show the licensing message. It looks like deployment environment uses the assembly from nuget.org. Please refer the below article to avoid the licensing messages in deployment. 

Regards, 
Vinoth S. 


Loader.
Live Chat Icon For mobile
Up arrow icon