When defining the HTML5 report viewer, one can either specify a TypeReportSource or UriReportSource as follows:
[code language="csharp"]
.ReportSource(new TypeReportSource() { TypeName = typeof(ReportCatalog).AssemblyQualifiedName })
[/code]
When using the TypeReportSource I see all the reports defined within the assembly containing ReportCatalog.
My RESTFul report service is configured to return an instance of ReportTypeResolver as shown below:
[code language="csharp"]
public class ReportsController : ReportsControllerBase
{
// GET: Reports
//public ActionResult Index()
//{
// return View();
//}
protected override IReportResolver CreateReportResolver()
{
// var reportsPath = HttpContext.Current.Server.MapPath("~/ReportDefinitions");
//return new ReportFileResolver(reportsPath);
// .AddFallbackResolver(new ReportTypeResolver());
// use this for Visual Studio reports
return new ReportTypeResolver();
}
[/code]
If I was going to use the standalone report designer to create the reports and drop all report definitions in a folder named ReportDefinitions in my ASP.NET MVC project, how do I present this in the same catalog manner as if I was using the TypeReportSource?
I tried returning an instance of ReportFileResolver(reportsPath) as indicated in the commented section of the code without FallBack, setting the ReportSource of the report viewer to UriReportSource but the report viewer gives an error.
[code language="csharp"]
.ReportSource(new TypeReportSource() { TypeName = typeof(ReportCatalog).AssemblyQualifiedName })
[/code]
When using the TypeReportSource I see all the reports defined within the assembly containing ReportCatalog.
My RESTFul report service is configured to return an instance of ReportTypeResolver as shown below:
[code language="csharp"]
public class ReportsController : ReportsControllerBase
{
// GET: Reports
//public ActionResult Index()
//{
// return View();
//}
protected override IReportResolver CreateReportResolver()
{
// var reportsPath = HttpContext.Current.Server.MapPath("~/ReportDefinitions");
//return new ReportFileResolver(reportsPath);
// .AddFallbackResolver(new ReportTypeResolver());
// use this for Visual Studio reports
return new ReportTypeResolver();
}
[/code]
If I was going to use the standalone report designer to create the reports and drop all report definitions in a folder named ReportDefinitions in my ASP.NET MVC project, how do I present this in the same catalog manner as if I was using the TypeReportSource?
I tried returning an instance of ReportFileResolver(reportsPath) as indicated in the commented section of the code without FallBack, setting the ReportSource of the report viewer to UriReportSource but the report viewer gives an error.