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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can I generate a report in my MVC 5 website without the Report Server

Thread ID:





130718 May 29,2017 02:38 AM UTC May 30,2017 05:03 AM UTC ASP.NET MVC 3
Tags: ReportViewer
Greg Obleshchuk
Asked On May 29, 2017 02:38 AM UTC

I'm looking for a simple way to generate a report in PDF format on my MVC website.  Can I use local processing to generate a PDF of a report?  I don't want to have to deploy a report server


Yuvaraj Devarajan [Syncfusion]
Replied On May 29, 2017 10:19 AM UTC

Hi Greg, 

We can achieve your requirement by using ReportWriter control to export the report into PDF, Excel, Word, PPT and HTML directly without using ReportServer in your application as shown in below code example. 

        public ActionResult Index(String writerFormat) 
                string fileName = null; 
                WriterFormat format;                
                HttpContext httpContext = System.Web.HttpContext.Current; 
                ReportWriter reportWriter = new ReportWriter(); 
                reportWriter.ReportPath = Server.MapPath("~/App_Data/GroupingAgg.rdl");                 
                reportWriter.ReportProcessingMode = ProcessingMode.Remote; 
                if (writerFormat == "PDF") 
                    fileName = "GroupingAgg.pdf"; 
                    format = WriterFormat.PDF; 
                else if (writerFormat == "Word") 
                    fileName = "GroupingAgg.doc"; 
                    format = WriterFormat.Word; 
                else if (writerFormat == "Html") 
                    fileName = "GroupingAgg.Html"; 
                    format = WriterFormat.HTML; 
                    fileName = "GroupingAgg.xls"; 
                    format = WriterFormat.Excel; 
                reportWriter.Save(fileName, format, httpContext.Response); 
            catch { } 
            return View()       

Please refer to the below UG documentation for more detail, 

You can obtain the ASP.Net ReportWriter samples from the below build installed location,   

Yuvaraj D. 

Greg Obleshchuk
Replied On May 29, 2017 10:47 AM UTC

That's great , thank-you very much

Yuvaraj Devarajan [Syncfusion]
Replied On May 30, 2017 05:03 AM UTC

Hi Greg, 
Thanks for your update. We are happy to hear that your requirement is resolved. 
Yuvaraj D 


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

or the page will be automatically redirected to 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