Page 1 of 1

Dynamically load image

Posted: Tue Aug 08, 2023 4:07 am
by huangguangc
Hello,

the image data I get from the api is as follows:

Code: Select all

{
  "url": "/upload/20230425151810.jpg"
}
The image server is at http://localhost:3000.

The image download address is obtained by combining the address of the image server and the image url.

Code: Select all

http://localhost:3000/upload/20230425151810.jpg
Finally, I need to display this image in my report. How do I do that? Thanks.

Re: Dynamically load image

Posted: Fri Aug 11, 2023 2:45 pm
by Lech Kulikowski
Hello,

You can use the following expression for the Hyperlink property of the Image:
{"http://localhost:3000" + root.url}

Thank you.

Re: Dynamically load image

Posted: Mon Aug 14, 2023 1:31 am
by huangguangc
Lech Kulikowski wrote: Fri Aug 11, 2023 2:45 pm Hello,

You can use the following expression for the Hyperlink property of the Image:
{"http://localhost:3000" + root.url}

Thank you.
Thank you for your help. How to include the Authorization field in the request header when requesting resources? Our image server requires a token to be authenticated for access.

Re: Dynamically load image

Posted: Mon Aug 14, 2023 7:41 am
by Lech Kulikowski
Hello,

Unfortunately, there are no ways for images. You can retrieve all images in your code and then provide to the report as resources or data source.

Thank you.