Closed om-ganesh closed 8 years ago
Take the below as my opinion/suggestion only, as I am not a dev on this project:
This project (at it's core) is nothing more than a wrapper around the WebForms ReportViewer control. ReportViewer will not load .rdl files locally with ProcessingMode.Local
. You might be able to use Report.LoadReportDefinition to load the file definition locally, but it will still be processed remotely.
I also don't see that a Report object is ever used in this project, so it's probably not possible at the moment anyway.
It's worth noting that (since MVC is built on top of ASP.NET) you can mix WebForms and MVC in one project, so there's nothing stopping you from adding a WebForms page and using the ReportViewer directly.
@tiesont thanks for your suggestions !!! Yes, I have added the reportviewer in my separate webform application and display the .rdl output successfully. But, I am not able to integrate the webforms in my mvc application and call them using controller methods.
Have you ever worked with opening the web forms in and from the asp.net mvc5 application? Please provide your some insights on it. Thanks, Subash
You don't need a separate application. You can mix controllers and views with WebForms (.aspx) pages within a single application, and even still use routing.
The only thing that (somewhat) prevents you from doing so is if you're trying to mix VB.NET and C# - it takes a fair amount of kludging to make those work side-by-side.
I'm not sure what you mean by "call them using controller methods" - you can redirect to any URL from a controller action. You wouldn't return a WebForms page as an ActionResult, though, if that's what you're trying to do (it's possible, but why do that when a redirect works?).
Hello,
As I know, Microsoft Report Viewer cannot render SSRS RDL reports. You have to deploy then to your SSRS server or create a local reports in Visual Studio (*.rdlc).
If you want to use SSRS then you should use Remote Processing mode. You can find sample code in the Example application I created for this project.
If it does not help then I'd suggest to check the following.
<add key="MvcReportViewer.ErrorPage" value="" />
<add key="MvcReportViewer.ShowErrorPage" value="True" />
If nothing help than take the source code from git, add it to the project and build it.
Please let me know if you will find any issue in the code itself.
Thanks, Ilya
Hello, I have generated the *.rdl file from SSRS and put the one in the App_data/Reports/MyReport.rdl. On debug i found that the model object is getting data correctly from db and and also reflecting in model in LocalReports.cshtml with model.Result1
Used model is very simple as the one in given example:
public class RDLViewModel { public System.Data.DataTable Result1 { get; set; } }
I have also set and not getting any errors.
`@using Microsoft.Reporting.WebForms; @using MvcReportViewer; @using MVCReportViwerApplication.Models;
@model RDLViewModel @{ ViewBag.Title = "LocalReports";
}
LocalReports
@Html.MvcReportViewerFluent("App_Data/Reports/MyReport.rdl").ProcessingMode(ProcessingMode.Local).LocalDataSource("Result1", Model.Result1).ControlSettings(settings).Attributes(new { Height = 900, Width = 900, style = "border: none" })`
As far my research rdl and rdlc file format are same except datasets element, so have the mvcreportviewer is tested with rdl or Am i making something wrong.
The output is blank without any errors, so I am stuck!!!