\api\reports\clients\{string}\instances\{string}\Content\images\ does not find file?

2 posts, 0 answers
  1. Angelina
    Angelina avatar
    3 posts
    Member since:
    Apr 2014

    Posted 18 Dec 2014 Link to this post

    Hello, I am trying to get an image onto the report. I had a previous version that works great. I have trouble updating to the latest version.

    Version (Works great)
    string resource = HttpContext.Current.Server.MapPath(@".\Images");
    resource is "F:\SolutionName\ProjectName\Images"

    Upgrade to Version
    var resource = HttpContext.Current.Server.MapPath(@".\Content\images");
    resource is "C:\LocalFolder\SolutionName\ProjectName\api\reports\clients\083132-aa72\instances\083132-14d3\Content\images"

    However, my resources are located "C:\LocalFolder\SolutionName\ProjectName\Content\images" and it doesn't get found.

    Please help!

  2. Stef
    Stef avatar
    3610 posts

    Posted 23 Dec 2014 Link to this post

    Hi Angelina,

    If you are using relative paths they are resolved based on the start project's execution folder. The recommended syntax for using relative paths is ./folder/folder/image - PictureBox item. If paths are absolute they must not be changed during the processing of the report.

    All processed images are saved as resources, which are loaded in the report with requests to the Reporting REST service from the HTML rendered in the viewer (the report rendered as HTML).

    To provide you more accurate suggestions, please paste the code used to set the PictureBox.Value (report's code-behind or/and XML).


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top