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

Export ReportViewer to excel sheet is failing

Thread ID:





121067 Nov 8,2015 01:41 PM UTC Nov 9,2015 12:08 PM UTC ASP.NET MVC 1
Tags: ReportViewer
vijay pratap
Asked On November 8, 2015 01:41 PM UTC

We are planning to buy license for Syncfusion Control but during some sample design for POC I am getting error in Downloading excel file.

I am opening a Reportviewer in ASP.NET MVC.but on export to Excel click it renders the Script body as

<body><pre style="word-wrap: break-word; white-space: pre-wrap;"></pre></body>

and No excel file is downloaded.

My Code is 

View Code 
<!DOCTYPE html>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    @using Syncfusion.MVC.EJ

    @using Syncfusion.JavaScript.Models

    @using Syncfusion.JavaScript

    <link rel='nofollow' href="@Url.Content("~/Content/ej/web/Default-theme/ej.widgets.all.min.css")" rel="stylesheet" />
    <script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jsrender.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.easing.1.3.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.globalize.min.js")"></script>
    <script src="@Url.Content("~/Scripts/ej/ej.web.all.min.js")"></script>
    <script src="@Url.Content("~/Scripts/ej/ej.unobtrusive.min.js")"></script>
    @if (ViewBag.ReportPath != null)
    <div id="rptContainer" style="height: 750px;width: 850px;min-height:404px; overflow:hidden">
               .ReportServiceUrl(@Url.Content("~/api/ReportAPI")).Parameters(param =>
                   param.Name("TenantID").Values(new List<string> { Convert.ToString(ViewBag.TenantId) }).Add();


            The selected Report is not available

    @*<p class="pull-right">
        <input class="btn btn-success" data-dissmiss="modal" type="button" value="CLOSE">

The Controller code is
using Syncfusion.EJ.ReportViewer;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
 public class ReportAPIController : ApiController, IReportController
        public object PostReportAction(Dictionary<string, object> jsonResult)
            return ReportHelper.ProcessReport(jsonResult, this);
        public object GetResource(string key, string resourcetype, bool isPrint)
            return ReportHelper.GetResource(key, resourcetype, isPrint);
        public void OnInitReportOptions(ReportViewerOptions reportOption)
        public void OnReportLoaded(ReportViewerOptions reportOption)

And Other View Controller

public ActionResult ReportViewer(string reportName, ReportType reportType)
            ViewBag.TenantId = SessionState.TenantID;
            var reportInformation = ReportingServices.GetReportingInformation(reportName, reportType);
            var ServerUrl = Config.GetReportServerUrl;
            var ReportViewer = Config.GetReportViewerName;
            if (reportInformation != null)
                ViewBag.ReportPath = reportInformation.ReportPath;
            return PartialView();

Any help would be appreciated, Thanks for getting throught the post.

Venkatesan Pandian [Syncfusion]
Replied On November 9, 2015 12:08 PM UTC

Hi Vijay,

We are unable to reproduce the reported issue at our end. We suspect this issue might occur due to invalid expression in report. Can you revert us by modifying the sample based on your application along with the replication procedure this would be helpful for us to provide a solution at the earliest.



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