ASP.NET MVC中JSVIEWER显示Report Not Found,哪里错了?
报表放在http://www.****.com/WangzcSmartCampus/虚拟目录中,虚拟目录指向:E:\Test
报表位置:E:\WEB\Test\Reports\RdlReport1.rdlx
Starttup.cs:
using GrapeCity.ActiveReports.Aspnet.Viewer;
using Microsoft.Owin;
using Owin;
using System;
using System.IO;
using System.Web.Routing;
[assembly: OwinStartupAttribute(typeof(WangzcSmartCampusWeb.Startup))]
namespace WangzcSmartCampusWeb
{
public partial class Startup
{
public static string EmbeddedReportsPrefix = "WangzcSmartCampus.Reports";
public void Configuration(IAppBuilder app)
{
app.UseReporting(settings =>
{
settings.UseFileStore(new DirectoryInfo(String.Format(@"{0}.\Reports", System.Web.HttpRuntime.AppDomainAppPath)));
});
RouteTable.Routes.RouteExistingFiles = true;
}
}
}
<script type="text/javascript">
var viewer = GrapeCity.ActiveReports.JSViewer.create({
element: '#viewerContainer',
reportID: 'RdlReport1.rdlx', // the id of the report to display
availableExports: ['Xml', 'Pdf', 'Excel'],
reportService: {
url: '/WangzcSmartCampus/Reports/'
}
// other properties
});
</script>
浏览器打开后报错: Report not found: RdlReport1.rdlx
CONSOLE提示:
jsViewer.min.js:81 GET http://www.****.com/WangzcSmartCampus/Reports/reports/RdlReport1.rdlx/info 404 (Not Found)
请问如何解决?