Relative image path '{0}' is not resolved to absolute

7 posts, 1 answers
  1. Logan
    Logan avatar
    17 posts
    Member since:
    Jul 2018

    Posted 13 Feb Link to this post

    Hello! I was wondering if anyone could point me to a resource that goes a little further in-depth with how paths are handled in PictureBox items.

    I have a set of pictures that I am attempting to display without embedding them in the report. In the Standalone Report Designer, it works. But in the Report Server, I get the error from the title of my thread, even though I've replicated the filepath for the pictures and populated the directory with them.

     

    However, there is another set of pictures in the same report stored in the same file that are displaying. But it's location is being built in a data source and they are displaying as expected.

  2. Logan
    Logan avatar
    17 posts
    Member since:
    Jul 2018

    Posted 13 Feb in reply to Logan Link to this post

    I am passing it an absolute file path locally, complete with file name in the directory.

    Initially I had it passed into the Value property like so: ="C:\My_Custom_Directory\My_Pic.GIF"

    Then I discovered if I delete the quotes and the '=' it prerendered the PictureBox, like so: C:\My_Custom_Directory\My_Pic.GIF
  3. Logan
    Logan avatar
    17 posts
    Member since:
    Jul 2018

    Posted 13 Feb in reply to Logan Link to this post

    PictureBox item's Value property was set as: ="C:\My_Path\My_Image.GIF"

    which worked locally but not in the server.

    Now it is set as: C:\My_Path\My_Image.GIF

    which also worked locally, prerendered the image in the PictureBox, and still doesn't work on the server.

  4. Logan
    Logan avatar
    17 posts
    Member since:
    Jul 2018

    Posted 13 Feb in reply to Logan Link to this post

    PictureBox item's Value property was set as: ="C:\My_Path\My_Image.GIF"

    which worked locally but not in the server.

    Now it is set as: C:\My_Path\My_Image.GIF

    which also worked locally, prerendered the image in the PictureBox, and still doesn't work on the server.

  5. Logan
    Logan avatar
    17 posts
    Member since:
    Jul 2018

    Posted 13 Feb Link to this post

    Sorry for the repeats. It kept telling me something went wrong.
  6. Answer
    Silviya
    Admin
    Silviya avatar
    344 posts

    Posted 18 Feb Link to this post

    Hi Logan,

    You could find more information about PictureBox item's data binding in our PictureBox: Data Binding section of the help article.

    As a side note, prior to version 4.2.18.912 of Report Server, we have a bug with resolving the PictureBox image from relative and absolute path. Please refer to Progress® Telerik® Report Server R3 2018 (4.2.18.912) release history page for more information. AA possible workaround prior to this version is using a custom function that returns a System.Drawing.Bitmap instance with the image instead of the path. In this case the path to the image will be resolved by the user function.

    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
  7. Logan
    Logan avatar
    17 posts
    Member since:
    Jul 2018

    Posted 18 Feb in reply to Silviya Link to this post

    Oh! That describes exactly what I'm seeing, thank you Silviya! I will take a look at that link.

    Have a good day and thank you for the information!
Back to Top