Can't figure out relative URI syntex for PicBox

9 posts, 1 answers
  1. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 23 May 2014 Link to this post

    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?
  2. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 23 May 2014 in reply to John Link to this post

    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.
  3. Answer
    Stef
    Admin
    Stef avatar
    3610 posts

    Posted 27 May 2014 Link to this post

    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.

     
  4. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 27 May 2014 in reply to Stef Link to this post

    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.
  5. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 29 May 2014 Link to this post

    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.

     
  6. headPropellerHead
    headPropellerHead avatar
    15 posts
    Member since:
    Jul 2007

    Posted 15 May 2018 in reply to Stef Link to this post

    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?
  7. Silviya
    Admin
    Silviya avatar
    414 posts

    Posted 17 May 2018 Link to this post

    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
  8. headPropellerHead
    headPropellerHead avatar
    15 posts
    Member since:
    Jul 2007

    Posted 20 Jun 2018 in reply to Silviya Link to this post

    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,

  9. Silviya
    Admin
    Silviya avatar
    414 posts

    Posted 25 Jun 2018 Link to this post

    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
Back to Top