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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

.Net Core Report Drilldown and Drillthrough

Thread ID:

Created:

Updated:

Platform:

Replies:

146513 Aug 6,2019 08:36 PM UTC Sep 4,2019 12:05 PM UTC Report Platform 3
loading
Tags: Report Viewer
Paul West
Asked On August 6, 2019 08:36 PM UTC

Are there any examples of using drilldown and drillthrough in the .net core report viewer? I attempted to call a new report using the Action of a chart series by setting the URL in the action, but the viewer didn't respond at all to the click event.

Vinoth Srinivasan [Syncfusion]
Replied On August 7, 2019 12:45 PM UTC

Hi Paul, 

We have prepared a ASP.NET Core ReportViewer application for rendering the Drillthrough report and drilldown report. The sample can be downloaded from below location. 

Note: In ASP.NET Core platform when loading the local RDL report we need to pass the stream for ReportModel. But if we need to render drillthrough report or Subreport then we need to use the External server concept as shown in below code snippet. 

public partial class HomeController : Controller, IReportController 
    { 
        private IMemoryCache _cache; 
        private IHostingEnvironment _hostingEnvironment; 
 
        public HomeController(IMemoryCache memoryCache, IHostingEnvironment hostingEnvironment) 
        { 
            _cache = memoryCache; 
            _hostingEnvironment = hostingEnvironment; 
        } 
 
        [HttpPost] 
        public object PostReportAction([FromBody] Dictionary<string, object> jsonResult) 
        { 
            return ReportHelper.ProcessReport(jsonResult, this, this._cache); 
        } 
 
        [ActionName("GetResource")] 
        [AcceptVerbs("GET")] 
        public object GetResource(ReportResource resource) 
        { 
            return ReportHelper.GetResource(resource, this, _cache); 
        } 
 
        [HttpPost] 
        public object PostFormReportAction() 
        { 
            return ReportHelper.ProcessReport(null, this, this._cache); 
        } 
 
        public void OnInitReportOptions(ReportViewerOptions reportOption) 
        { 
            reportOption.ReportModel.ReportServerUrl = "http://<No server>"; 
            reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("<no user>", "<no password>"); 
 
            Reportserver reportserver = new Reportserver(_hostingEnvironment); 
            reportOption.ReportModel.ReportingServer = reportserver; 
        } 
 
        public void OnReportLoaded(ReportViewerOptions reportOption) 
        { 
            
        } 
    } 
 
    public class Reportserver : ReportingServer 
    { 
        private IHostingEnvironment _hostingEnvironment; 
 
        public Reportserver(IHostingEnvironment hostingEnvironment) 
        { 
            _hostingEnvironment = hostingEnvironment; 
        } 
 
        public override Stream GetReport() 
        { 
            string basePath = _hostingEnvironment.WebRootPath + "/ReportData/"; 
            FileStream inputStream = new FileStream(basePath+this.ReportPath+".rdl", FileMode.Open, FileAccess.Read); 
            return inputStream; 
        } 
    } 

 
 
Regards, 
Vinoth S. 


Paul West
Replied On September 3, 2019 02:31 PM UTC

I have no problem creating a drillthrough on a tablix cell. The issue I'm having is with a drillthrough on a chart series. Clicking on the series does nothing. I used the same expression (with changed field name) that worked with tablix.

The Action is set to URL and the expression for the Action is set to:
="http://{HOSTPATH}Index/RunReport?rpt=CallHistory.rdl&gid=4d74597c-b03c-4742-9c82-d5b3b3056c21&param=TimeRange&data="&Fields!callTime.Value

This renders the drillthrough just as any other report call.

Vinoth Srinivasan [Syncfusion]
Replied On September 4, 2019 12:05 PM UTC

Hi Paul, 
 
We have recently fixed the drillthrough issue with chart series at our end and it will be included in our upcoming report platform release which is expected to be available on mid of September 2019. 
 
Regards, 
Vinoth S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon