My View
<
style
>
#reportViewer1 {
position: relative;
width: 1300px;
height: 900px;
}
</
style
>
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.ServiceUrl(Url.Content("/api/reports/"))
.TemplateUrl("/Resources/Templates/telerikReportViewerTemplate.html")
.ReportSource(new UriReportSource() { Uri = "Report1.trdp" })
.ViewMode(ViewMode.Interactive)
.ScaleMode(ScaleMode.Specific)
.Scale(1.0)
.PersistSession(false)
.PrintMode(PrintMode.AutoSelect)
)
My controller
namespace OvalWeb.Controllers
{
using System.IO;
using System.Web;
using Telerik.Reporting.Cache.File;
using Telerik.Reporting.Services;
using Telerik.Reporting.Services.Engine;
using Telerik.Reporting.Services.WebApi;
//The class name determines the service URL.
//ReportsController class name defines /api/report/ service URL.
public class ReportsController : ReportsControllerBase
{
static ReportServiceConfiguration preservedConfiguration;
static IReportServiceConfiguration PreservedConfiguration
{
get
{
if (null == preservedConfiguration)
{
preservedConfiguration = new ReportServiceConfiguration
{
HostAppId = "OvalWebReport",
Storage = new FileStorage("C:/Storage"),
ReportResolver = CreateResolver(),
// ReportSharingTimeout = 0,
// ClientSessionTimeout = 15,
};
}
return preservedConfiguration;
}
}
public ReportsController()
{
this.ReportServiceConfiguration = PreservedConfiguration;
}
static IReportResolver CreateResolver()
{
var appPath = HttpContext.Current.Server.MapPath("~/");
var reportsPath = Path.Combine(appPath, @"Report\Designs\Ventas\Tickets\Familia");
return new ReportFileResolver(reportsPath)
.AddFallbackResolver(new ReportTypeResolver());
}
}
}
It shows me the error attached.
What could be the problem?