Using reportviewer shows root instead of report.

  • I'm using the reportviewer in my web app and in my code behind I specify:

    ReportViewer1.ServerUrl = "http://myserver/reports"; //not local machine

    ReportViewer1.ReportPath = "SampleReports/Company Sales";

    I'm prompted for credentials because it is not on the same machine.

    Then I'm shown the main root with all my folders instead of the single report.

    Any help would be appreciated.

  • The path is a little goofy with spaces and slashes. Try this:

    ReportViewer1.ReportPath = "/SampleReports/Company+Sales";

    I hope this is of some help to you.

  • I'm actually passing a Server.UrlEncode'd string and I Reponse.Write it to the page to verify and it looks fine.

  • Success!

    I had

    ReportViewer1.ServerUrl = "http://myserver/reports";

    but is should have been:

    ReportViewer1.ServerUrl = "http://myserver/reportserver";

    Hope this helps anyone else.

    Greg

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply