I have recently started using Telerik reporting my team is using ASP.net Webforms can I have implemented the Telerik Reporting REST service as detailed here http://docs.telerik.com/reporting/telerik-reporting-rest-conception and tested the web API which returned the json file. But when using the report viewer to call a trdp file saved on my project folder I get the following error "Unable to get report parameters.Report 'BarcodesReport.trdp' cannot be resolved". Below is my code for the page, snippet of the error and API controller. Any feeback is greatly appreciated
Report.aspx.cs
public partial class Report : Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
var clientReportSource = new Telerik.ReportViewer.Html5.WebForms.ReportSource();
clientReportSource.IdentifierType = IdentifierType.UriReportSource;
clientReportSource.Identifier = "BarcodesReport.trdp";
ReportViewer1.ReportSource = clientReportSource;
}
}
}
ReportsController.cs
public class ReportsController : ReportsControllerBase
{
static ReportServiceConfiguration configurationInstance;
static ReportsController()
{
var appPath = HttpContext.Current.Server.MapPath("~/");
var reportsPath = Path.Combine(appPath, @"..\..\..\Report");
var resolver = new ReportFileResolver(reportsPath)
.AddFallbackResolver(new ReportFileResolver());
configurationInstance = new ReportServiceConfiguration
{
HostAppId = "Application1",
Storage = new FileStorage(),
ReportResolver = resolver,
// ReportSharingTimeout = 0,
// ClientSessionTimeout = 15,
};
}
public ReportsController()
{
this.ReportServiceConfiguration = configurationInstance;
}
}