<PageHeaderSection Height="0.899999936421712in" Name="pageHeader">
<Items>
<TextBox Width="4.07916673024496in" Height="0.400000015894572in" Left="0.0208333333333333in" Top="0.0208333333333333in" Value="Workspaces" Name="reportNameTextBox" StyleName="PageInfo" />
<PictureBox Url="~/images/logo.png" Width="1.79999987284342in" Height="0.700000047683716in" Left="4.63750012715658in" Top="0.0208333333333333in" Sizing="ScaleProportional" MimeType="" Name="pictureBox1" />
</Items>
</PageHeaderSection>
I am trying to specify the image relative the virtual directory (this is not a web site) of the place where the report controller resides (REST API)
What is the correct syntax?
8 Answers, 1 is accepted
<PictureBox Url="./images/logo.png" Width="1.79999987284342in" Height="0.700000047683716in" Left="4.63750012715658in" Top="0.0208333333333333in" Sizing="ScaleProportional" MimeType="" Name="pictureBox1" />
The ~ does not appear to work.
As of Q3 2013 we use unified approach to set relative paths to images for PictureBox items. Thus '~' would not work as it is specific for Web applications only.
The latest details about setting a PictureBox.Value property are available in the PictureBox help article.
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.
Url="./images/logo.png"
I do see that relative approach in the help referenced above, but had missed it because it was kind of buried in a C# code example as a comment. Maybe lifting that out as a separate code independent section of the help topic would be useful, as not all report designers want to use code to specify image locations.
Thank you for your feedback.
We will update our help resources with more details about using relative paths.
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.
From the provided information, I assume that you are trying to resolve a relative path to an image in a web application. I tested with version 12.0.18.227 and seems to work as expected on my side.
However, there is a known issue with resolving the relative path of the PictureBox in a web application that was introduced in version 12.0.18.416 (R1 2018 SP3). We have logged the bug in our system for fixing, and it should be fixed for one of the upcoming service packs.
Currently we cannot offer a suitable workaround with the latest versions, except using absolute paths for the images or downgrading Telerik Reporting version.
But in case you are experiencing the issue using version older than 12.0.18.416, I would ask you to open a support ticket and send us the problematic project for further investigation.
Regards,
Silviya
Progress Telerik
Thanks, Silviya.
I'm using R2 2018 (12.1.18.516) now, and the bug still exists.
Yes, it will be deployed as a Web application, but I'm just trying to get it to work in VS2017 (Version 15.7.2) development environment for now.
I have tried giving it the correct relative path as .\<path>\<subFolder1>\<subFolder2>\<filename>.jpg AND ./<path>/<subFolder1>/<subFolder2>/<filename>.jpg. Neither works.
I tried downgrading to the version in which I originally wrote the rest of the reports in this project (Q2_2013_SP1), but that broke so many things in my other reports, report projects, and with integration that I had to abandon it. Is there a current version I can download that addresses this bug without breaking all of my other upgraded reports?
Thanks,
This issue has been fixed in the next version R2 2018 SP1 (12.1.18.620), which can be downloaded from your user account. Once you log in, you should go to Downloads page, locate Progress Telerik Reporting product and when you click on it, a download page should appear, showing the last main build and the latest internal build.
Regards,
Silviya
Progress Telerik