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

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

6 Answers 599 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Logan
Top achievements
Rank 1
Logan asked on 13 Feb 2019, 09:51 PM

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.

6 Answers, 1 is accepted

Sort by
0
Logan
Top achievements
Rank 1
answered on 13 Feb 2019, 09:56 PM
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
0
Logan
Top achievements
Rank 1
answered on 13 Feb 2019, 09:57 PM

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.

0
Logan
Top achievements
Rank 1
answered on 13 Feb 2019, 09:58 PM

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.

0
Logan
Top achievements
Rank 1
answered on 13 Feb 2019, 09:58 PM
Sorry for the repeats. It kept telling me something went wrong.
0
Accepted
Silviya
Telerik team
answered on 18 Feb 2019, 04:40 PM
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
0
Logan
Top achievements
Rank 1
answered on 18 Feb 2019, 07:08 PM
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!
Tags
Report Designer (standalone)
Asked by
Logan
Top achievements
Rank 1
Answers by
Logan
Top achievements
Rank 1
Silviya
Telerik team
Share this question
or