ASP.net - Telerik Reporting error - Unable to get report parameters.Report 'BarcodesReport.trdp' cannot be resolved

3 Answers 2476 Views
General Discussions
Henry
Top achievements
Rank 1
Henry asked on 05 Sep 2017, 05:13 PM

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;
}
}

 

 

Henry
Top achievements
Rank 1
commented on 07 Sep 2017, 02:25 PM

Can someone please help me with this. We have a deadline for these reports!

3 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 07 Sep 2017, 03:19 PM
Hi Henry,

Check if the file name set as clientReportSource.Identifier is correct. If you use sample BarcodesReport that is provided with Telerik Reporting installation note that it has a whitespace character in its name and should be referenced as:
clientReportSource.Identifier = "Barcodes Report.trdp";

Also, make sure that the report file is actually present in the folder specified for the ReportFileResolver in ReportsController: 
var appPath = HttpContext.Current.Server.MapPath("~/");
var reportsPath = Path.Combine(appPath, @"..\..\..\Report");
var resolver = new ReportFileResolver(reportsPath);

Note that you have an option to submit a support ticket which guarantees you a faster response (should be checked with your support plan).
We cannot guarantee you a timely response in a forum.

In case the issue persists send us a sample project that demonstrates your current settings in a support ticket so we can test it on our side and provide you further suggestions.
 

Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Henry
Top achievements
Rank 1
commented on 14 Sep 2017, 03:02 PM

Hi Katia,

 

I submitted a ticket. Thank you

Andy Green
Top achievements
Rank 2
commented on 30 Aug 2018, 09:51 AM

What was the resolution here, I'm having the same problem

Andy

Todor
Telerik team
commented on 03 Sep 2018, 08:47 AM

Hi Andy,

I noticed that you have opened a support ticket on the same case. I suggest to continue our communication on the issue there, as it may be related to specific settings of the particular project.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Mirzodaler
Top achievements
Rank 1
Veteran
commented on 17 Jan 2019, 09:05 AM

Hi,

We have similar error message when using HtML5ReportViewer control with browser. The Telerik Repirting REST service is located in different domain. 

FYI: It works fine if the server is in localhost. It is only making a problem when the server is in different host.

Is there any special configurations for this case? And what was the solution for the previous questions?

 

Thank you,

Regards,

0
Todor
Telerik team
answered on 22 Jan 2019, 07:50 AM
Hello Mirzodaler,

The error indicates that the REST Service cannot find the specified report definition. This may be due to an invalid path to the report.
The REST Service is hosting the Reporting engine, hence it should have access to the reports to be rendered. 

Check whether the path to the report when the Telerik Repirting REST Service is located in different domain (i.e. other than localhost) is correctly specified in the ReportsController. The type that by default is responsible for resolving UriReportSources (.trdp/x reports) is the ReportFileResolver class, and its parameter should specify the location of the .trdp/x reports.
When the provided path to reports is relative, it would be resolved with respect to the starting point of the application. Hence, it may be necessary to either adjust the relative path, or create a sub folder in the application according to the specified relative path and copy the reports there.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Mirzodaler
Top achievements
Rank 1
Veteran
answered on 22 Jan 2019, 09:26 AM

Hi Todor,

 

Thanks for an answer. We found out that the report was not outputting in a right place in remote machine. 

Making sure the report trdp/x file is located in right place fixed the issue.

 

Thanks,

UnstablePixel
Top achievements
Rank 1
commented on 09 May 2019, 10:48 PM

Hi Mirzodaler,

how can i do that? i would appreciate your help

Mirzodaler
Top achievements
Rank 1
Veteran
commented on 13 May 2019, 07:20 AM

Hi,

Make sure reportsPath is referencing correct path for report files.

Jonathan
Top achievements
Rank 1
Veteran
commented on 06 Aug 2020, 03:31 PM

What is the right place for the report?
Neli
Telerik team
commented on 07 Aug 2020, 06:51 AM

Hello Jonathan,

Please, check Unable to get report parameters forum post.

Regards,
Neli
Progress Telerik

Tags
General Discussions
Asked by
Henry
Top achievements
Rank 1
Answers by
Katia
Telerik team
Todor
Telerik team
Mirzodaler
Top achievements
Rank 1
Veteran
Share this question
or