ReportViewer and ASP.NET MVC 3 - Razor

36 posts, 0 answers
  1. Steve
    Steve avatar
    10941 posts

    Posted 09 Aug 2012 Link to this post

    Hi guys,

    We've updated the code library Using Telerik Web Report viewer in ASP.NET MVC application with an MVC 3 project using the Razor view engine. There is nothing new to add, it uses the approach of including a partial view with the web report viewer in a MVC 3 page.

    the Telerik team

    BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

  2. Vassil Petev
    Vassil Petev avatar
    1765 posts

    Posted 26 Mar 2013 Link to this post

    Hi all,

    Just a quick update: we will be working on a new web viewer for Q2 2013 which will work with MVC without the extra steps. Until then, check out our new blog + video on how to use Telerik Reporting in MVC 4.

    Vassil Petev
    the Telerik team

    Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

  3. cheekl
    cheekl avatar
    55 posts
    Member since:
    Jul 2012

    Posted 23 Jun 2013 Link to this post


    When the new web viewer for Q2 2013 is release? We are waiting for this Q2 2013 release.

  4. Stef
    Stef avatar
    3611 posts

    Posted 27 Jun 2013 Link to this post


    We have rescheduled the release of the new viewer for Q3 2013. Meanwhile you can expect a preview of the feature to test it before the official release. If there are any changes they will be reflected in our Roadmap.


    Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

  5. Ed
    Ed avatar
    9 posts
    Member since:
    Jun 2010

    Posted 13 Nov 2013 Link to this post

    As an addendum, I recently need to pass some parameters to a report that was displayed from a ReportViewer in a partial (ASPX) page. It ended up being a fairly simple matter. Here's an example:

    // Controller code to display the View.
    ActionResult ReportView(string id)
        ViewBag.Title = "Parameterized Report";
        ViewBag.ReportViewName = "myparameterizedreport";
        ViewBag.ReportingParameters = new Telerik.Reporting.ParameterCollection()
            new Telerik.Reporting.Parameter("CodeList", "232,249")
        return View();

    The ReportView.cshtml file:
        ViewBag.Title = ViewBag.Title ?? "Reports";
    <link href="@Url.Content("~/Content/TelerikReportingFix.css")" rel="stylesheet" type="text/css" />
    @* Include ASPX page that embeds the report viewer and identifies the data source. *@

    And finally, the partial view that copies the parameters into the instantiated ReportViewer:
    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
    <%@ Register assembly="Telerik.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <script runat="server">
        protected void ReportViewer1_Load(object sender, EventArgs e)
            // Copy reporting parameters from the controller to the report instance.
            if (ViewBag.ReportingParameters != null)
                foreach (Telerik.Reporting.Parameter p in ViewBag.ReportingParameters)
        <head id="Head1" runat="server">
            <form id="form1" runat="server">
                    <telerik:ReportViewer ID="ReportViewer1" runat="server" Width="100%"
                        Height="800px" onload="ReportViewer1_Load">
                            typename="MyProject.Reports.MyParameterizedReport, MyProject, Version=, Culture=neutral, PublicKeyToken=null">

    In the definition of the CodeList report parameter, set Value to =Parameters.CodeList.Value to actually make the passed value available in the report.
  6. Stef
    Stef avatar
    3611 posts

    Posted 14 Nov 2013 Link to this post


    @Ed: Thank you for your examples.

    In addition, the new HTML5 Report Viewer is already released as of Telerik Reporting Q3 2013. More details about the new features can be found in the following help section:

    There are also examples in the local demos provided with your Telerik Reporting installation - C:\Program Files (x86)\Telerik\Reporting Q3 2013\Examples (the default installation folder).


    New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Back to Top