alanjuden / MvcReportViewer

Custom Report Viewer control to replace MS Report Viewer on MVC projects (also works on .NET Core as a Report Viewer).
MIT License
173 stars 109 forks source link

404 page not fount #104

Open Shoogn opened 3 years ago

Shoogn commented 3 years ago

Hi Alan I face the issue with this project, when fire the ( Report/ProcessReport ) it return 404 page not found I work with .NET 5, my report work normally from SSRS portal.

protected override string ReportServerUrl { get { //You don't want to put the full API path here, just the path to the report server's ReportServer directory that it creates (you should be able to access this path from your browser: https://YourReportServerUrl.com/ReportServer/ReportExecution2005.asmx ) //return null; return "http://" + Environment.MachineName + "/reportserver"; } }

` public IActionResult ProcessReport() { var model = this.GetReportViewerModel(Request); model.ReportPath = "/ReportWithASPNETCore/FirstReport";

        return RedirectToAction("ReportViewer", model);
    }`

Capture1

Shoogn commented 3 years ago

Thanks I fixed It should return View instead of RediretToAction

        `           public IActionResult ProcessReport()
    {
        var model = this.GetReportViewerModel(Request);
        model.ReportPath = "/ReportWithASPNETCore/FirstReport";

        return View("~/Views/Report/ReportViewer.cshtml", model);
    }`