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

Can't figure out relative URI syntex for PicBox

8 Answers 234 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 23 May 2014, 07:20 PM
Here is a snippet of a TRDX

    <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

Sort by
0
John
Top achievements
Rank 1
answered on 23 May 2014, 07:49 PM
Hah...figured it out

        <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.
0
Accepted
Stef
Telerik team
answered on 27 May 2014, 12:47 PM
Hello John,

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.

 
0
John
Top achievements
Rank 1
answered on 27 May 2014, 04:52 PM
Thanks, this worked

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.
0
Stef
Telerik team
answered on 29 May 2014, 08:49 AM
Hi John,

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.

 
0
headPropellerHead
Top achievements
Rank 1
answered on 15 May 2018, 03:15 PM
The pictureBox fails when trying to load a relative URI from the database (e.g., database field returns "./CustomerFiles/ABCCompany/ABClogo.png").  You get an "Invalid URI" message every time. I've tried with and without "~" instead of ".", with and without a preceding "@", using a user-defined function to return to return the Value, switching "\\" to "/" -- nothing works.  This worked flawlessly in the old 7.1.13.802 version.  I'm using version 12.0.18.227 now. Any chance this will ever get fixed?
0
Silviya
Telerik team
answered on 17 May 2018, 11:00 AM
Hello headPropellerHead,

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
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
headPropellerHead
Top achievements
Rank 1
answered on 20 Jun 2018, 05:22 PM

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,

0
Silviya
Telerik team
answered on 25 Jun 2018, 08:28 AM
Hi headPropellerHead,

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
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
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Stef
Telerik team
headPropellerHead
Top achievements
Rank 1
Silviya
Telerik team
Share this question
or