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.
Unfortunately, activation email could not send to your email. Please try again.

Can the ASP.NET/MVC report viewer render a RDLC file store in Azure storage

Thread ID:

Created:

Updated:

Platform:

Replies:

131960 Aug 5,2017 03:11 AM Aug 9,2017 01:51 AM ASP.NET MVC 3
loading
Tags: ReportViewer
James Lau
Asked On August 5, 2017 09:53 AM

Hi,We are developing a web application and want to store all rdlc files as Azure blob. How to configure report viewer to load it back?Thanks

Yuvaraj Devarajan [Syncfusion]
Replied On August 7, 2017 08:25 AM

Hi James, 

Thanks for contacting Syncfusion support.  

Our ReportViewer has support to pass the RDLC file as a stream in WebAPI controller. So, you can download the RDLC file from Azure blog then load the RDLC file as a stream in WebAPI controller as shown in below code example,  

WebAPI:  
        public void OnInitReportOptions(ReportViewerOptions reportOption) 
        { 
            byte[] byteArray = null; 
            if (reportOption.ReportModel.ReportPath.StartsWith("http:/") || reportOption.ReportModel.ReportPath.StartsWith("https:/")) 
            { 
                var webClient = new System.Net.WebClient(); 
                try 
                { 
                    byteArray = webClient.DownloadData(reportOption.ReportModel.ReportPath); 
                    Stream fileStream = new MemoryStream(byteArray); 
                    reportOption.ReportModel.Stream = fileStream; 
                } 
                catch (System.Net.WebException webEx) 
                { 
 
                } 
            } 
        } 
 
Please refer to the below UG documentation link to create a ReportViewer sample, 

You can obtain the JavaScript ReportViewer samples from the below build installed location, 
%userprofile%\AppData\Local\Syncfusion\EssentialStudio\version\JavaScript\ samples\web\reportviewer  

We have prepared a sample and it can be downloaded from, 

Regards, 
Yuvaraj D. 


James Lau
Replied On August 8, 2017 03:44 AM

Thank you so much. Yuvaraj


Yuvaraj Devarajan [Syncfusion]
Replied On August 9, 2017 01:51 AM

Hi James, 
 
Thanks for the update. We are happy to hear that your problem is resolved. 
 
Regards, 
Yuvaraj D. 


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.

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.

;