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

11 posts, 0 answers
  1. Henry
    Henry avatar
    8 posts
    Member since:
    May 2017

    Posted 05 Sep 2017 Link to this post

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

     

     

  2. Henry
    Henry avatar
    8 posts
    Member since:
    May 2017

    Posted 07 Sep 2017 in reply to Henry Link to this post

    Can someone please help me with this. We have a deadline for these reports!
  3. Katia
    Admin
    Katia avatar
    693 posts

    Posted 07 Sep 2017 Link to this post

    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
  4. Henry
    Henry avatar
    8 posts
    Member since:
    May 2017

    Posted 14 Sep 2017 in reply to Katia Link to this post

    Hi Katia,

     

    I submitted a ticket. Thank you

  5. Andy Green
    Andy Green avatar
    376 posts
    Member since:
    Aug 2008

    Posted 30 Aug 2018 Link to this post

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

    Andy

  6. Todor
    Admin
    Todor avatar
    307 posts

    Posted 03 Sep 2018 Link to this post

    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
  7. Mirzodaler
    Mirzodaler avatar
    7 posts
    Member since:
    Jun 2014

    Posted 17 Jan Link to this post

    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,

  8. Todor
    Admin
    Todor avatar
    307 posts

    Posted 22 Jan Link to this post

    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
  9. Mirzodaler
    Mirzodaler avatar
    7 posts
    Member since:
    Jun 2014

    Posted 22 Jan in reply to Todor Link to this post

    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,

  10. UnstablePixel
    UnstablePixel avatar
    4 posts
    Member since:
    Mar 2019

    Posted 09 May in reply to Mirzodaler Link to this post

    Hi Mirzodaler,

    how can i do that? i would appreciate your help

  11. Mirzodaler
    Mirzodaler avatar
    7 posts
    Member since:
    Jun 2014

    Posted 13 May in reply to UnstablePixel Link to this post

    Hi,

    Make sure reportsPath is referencing correct path for report files.

Back to Top