Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report failed to load, check report parameters #42

Open
k11k2 opened this issue Oct 16, 2017 · 12 comments
Open

Report failed to load, check report parameters #42

k11k2 opened this issue Oct 16, 2017 · 12 comments

Comments

@k11k2
Copy link

k11k2 commented Oct 16, 2017

I'm very new to this, Strictly followed your sample and end up with above error and in
console: http://localhost:3000/Report/ViewReportPage/?reportPath=%2FMoney.ReportServer%2FSalesOrder&page=1& 404 not found

what I'm missing here I need to host SSRS project in to server ? it can't deal with local .rdl files ? or may I missing something?. Please provide documentation or else guide me to complete my job.

@k11k2
Copy link
Author

k11k2 commented Oct 17, 2017

@deanilvincent I don't need to send any parameters right now, still I'm getting this issue, did I misunderstand any thing?

@deanilvincent
Copy link

Can you post your exact codes? @AlwaysAbhl001

@k11k2
Copy link
Author

k11k2 commented Oct 17, 2017

public class ReportController : AlanJuden.MvcReportViewer.ReportController
    {
        protected override ICredentials NetworkCredentials
        {
            get
            {
                return System.Net.CredentialCache.DefaultNetworkCredentials;
            }
        }

        protected override string ReportServerUrl
        {
            get
            {

                return "http://localhost/ReportServer";
            }
        }
        [HttpGet]
        public ActionResult MyReport()
        {
            var model = this.GetReportViewerModel(Request);
            model.ReportPath = "/Money.ReportServer/SalesOrder";

            return View("ReportViewer", model);

        }

    }

And ReportViewer.cshtml view looks same as author mention. Url of my SSRS project looks like http://localhost/ReportServer/Pages/ReportViewer.aspx?%2fMoney.ReportServer%2fSalesOrder&rs:Command=Render
@deanilvincent let me know, for any further information.

@alanjuden
Copy link
Owner

@AlwaysAbhl001, do you have a directory on your report server called "Money.ReportServer" as indicated by your ReportPath?

@k11k2
Copy link
Author

k11k2 commented Oct 17, 2017

Yes. -> Money.ReportServer/SalesOrder. If I deploy my SSRS project firstly it shows directory -Money.ReportServer after click on it moves to childtree - SalesOrder.

@k11k2
Copy link
Author

k11k2 commented Oct 18, 2017

If I mention wrong Directory it throwing

FaultException: System.Web.Services.Protocols.SoapException: The item '/Reports/SalesOrder' cannot be found. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The item '/Reports/SalesOrder' cannot be found.
at Microsoft.ReportingServices.Library.ReportingService2005Impl.GetReportParameters(String Report, String HistoryID, Boolean ForRendering, ParameterValue[] Values, DataSourceCredentials[] Credentials, ParameterInfoCollection& Parameters)
at Microsoft.ReportingServices.WebServer.ReportingService2005.GetReportParameters(String Report, String HistoryID, Boolean ForRendering, ParameterValue[] Values, DataSourceCredentials[] Credentials, ReportParameter[]& Parameters)

so mentioned Report Path is absolutely right one then what else stopping me @alanjuden ?

FYI: AdventuresWorks2008R2 db and my web application is aspnetcore2.0 webappMVC.

@kanichi123
Copy link

I have exactly the same issue like this, do you have any update on solutions?

@jmarti326
Copy link

You can check if the library is also looking at internal parameters not only the ones the user sends. In my case, I saw that if I manually removed the internal parameters, the viewer worked like a charm.

@kanichi123
Copy link

yep I don't have any internal parameters. I tried many time with different report, it's not even work with the sample. Do you mean that I need to update the code inside the library also?

@jmarti326
Copy link

Yes, this does make you do changes to the library. :(

@mpanezai
Copy link

mpanezai commented Jun 14, 2019

I have came across the same error "Report failed to load. check "Report parameters... ". in my case, I have two reports in Report Server (SQL Server 2012 R2), both with two parameters.. 1. Report with local/static content and the two parameters which takes values from user (asp.net web core 2.2 MVC) and display them on report which works fine, but the other one, 2. Report with its Dataset (stored procedure) which takes two parameter and pass it on to SP to fetch data from database. No matter how the Params are configured (hidden, visible) in the report the error noted above keeps showing.
on inspecting the calls in browsers Inspect:
image

@samirbanjanovic
Copy link

samirbanjanovic commented Jul 29, 2019

I am having this issue on a remote server. And it comes down to how the report URL is formatted in jquery. In our case the MVC app is hosted under URL that's similar to company.org/ReportViewer, but when the report comes back the jquery relies on uri to be company.org/Report/Some-Report-Name which is why we're getting 404.

We fixed it by switching to absolute uri instead of relative

var pageRootPath = document.location.href.slice(0, document.location.href.indexOf('/Report?'));
.
.
.
$.get(pageRootPath + "/Report/FindStringInReport" . . .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants