This is a migrated thread and some comments may be shown as answers.

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

1 Answer 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Angelina
Top achievements
Rank 1
Angelina asked on 18 Dec 2014, 04:47 PM
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 5.1.11.928 (Works great)
string resource = HttpContext.Current.Server.MapPath(@".\Images");
resource is "F:\SolutionName\ProjectName\Images"

Upgrade to Version  8.2.14.1204
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!


1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 23 Dec 2014, 12:05 PM
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).

Regards,
Stef
Telerik
 

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.

 
Tags
General Discussions
Asked by
Angelina
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or