Last post Jun 13, 2019 09:49 AM by Yuki Tao
Jun 11, 2019 09:49 AM|nrk_hi|LINK
I am trying to find out that is it possible to use .rdlc file to the mvc project, if yes what is the possible solution, how this can be achieved. I have searched but could not find any suitable solution related to MVC, most of them are done using asp.net.
My requirement is to check that can we display ssrs report inside a view(.cshtml). Please suggest me on this.
Tools i m using for development:
Visual Studio 2017 and sql server 2016
Jun 11, 2019 10:17 AM|AddWeb Solution|LINK
Yes It is possible to use .rdlc file to the mvc project.
Please find out below reference links
I hope this will help you
Jun 13, 2019 09:49 AM|Yuki Tao|LINK
My requirement is to check that can we display ssrs report inside a view(.cshtml)
You could refer to
this article,and follow its steps:
1.download ReportViewerForMvc in NuGet
2.Add following in <appSettings> Section.
<add key="ReportPath" value="/MyReports/"/>
3.Add following httpHandlers in <system.web> Section same as below:
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=126.96.36.199, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" validate="false"/>
4.Add following handlers in <system.webServer> Section same as below:
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=188.8.131.52, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
5.create ActionResult with the name of Report and add their view by right clicking on controllerName.
public ActionResult Report()
ReportViewer rptViewer = new ReportViewer();
// ProcessingMode will be Either Remote or Local
rptViewer.ProcessingMode = ProcessingMode.Remote;
rptViewer.SizeToReportContent = true;
rptViewer.ZoomMode = ZoomMode.PageWidth;
rptViewer.Width = Unit.Percentage(99);
rptViewer.Height = Unit.Pixel(1000);
rptViewer.AsyncRendering = true;
rptViewer.ServerReport.ReportServerUrl = new Uri("http://localhost/ReportServer/");
rptViewer.ServerReport.ReportPath = this.SetReportPath();
ViewBag.ReportViewer = rptViewer;
6. Then update Report.cshtml view with following.
@if (ViewBag.ReportViewer != null)
@Html.ReportViewer(ViewBag.ReportViewer as Microsoft.Reporting.WebForms.ReportViewer)
Hope it will be helpful to you.