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

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

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

3 Replies

YD Yuvaraj Devarajan Syncfusion Team August 7, 2017 12:25 PM UTC

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. 



JL James Lau August 8, 2017 07:44 AM UTC

Thank you so much. Yuvaraj



YD Yuvaraj Devarajan Syncfusion Team August 9, 2017 05:51 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon