# Report Image Key

**URL:** <https://forum.inductiveautomation.com/t/report-image-key/12870>\
**Category:** Ignition\
**Created:** [March 30, 2017, 4:54am UTC](https://forum.inductiveautomation.com/t/report-image-key/12870 "2017-03-30T04:54:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jenko](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jenko](https://forum.inductiveautomation.com/u/Jenko)\
**Post date:** [March 30, 2017, 4:54am UTC](https://forum.inductiveautomation.com/t/report-image-key/12870/1 "2017-03-30T04:54:58Z")

</div>

Hi,

I’m using Ignition 7.9.1 and trying to make a report using the Reporting module that has dynamic product images.  
I have some images that I would like to show on the report stored on the Gateway in Image management.

Is there a way to bind the key of an image placeholder of a report to the Gateway Image storage?

I currently have an SQL query that points to the Gateway Images but it doesn’t work.  
I create a string like this:  
SELECT ‘Product Images/’ + SUBSTRING(SKU,5,3) + ‘.png’ AS ImageKey

The correct variables pass through but I get the following in the Console:

15:39:08.106 [SwingWorker-pool-2-thread-4] WARN reporting.Web - Attempt to get web file at location /Product Images/LIT.png failed.

Any suggestions?

Cheers  
Dan

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [March 30, 2017, 1:53pm UTC](https://forum.inductiveautomation.com/t/report-image-key/12870/2 "2017-03-30T13:53:58Z")

</div>

How exactly do you have this set up? The error message looks like it’s trying to get a file on disk, but you mentioned that you’re using a SQL query. Are the images on disk or in a database?

---

<div class="post-metadata">

**Author:** ![Jenko](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jenko](https://forum.inductiveautomation.com/u/Jenko)\
**Post date:** [April 3, 2017, 1:52am UTC](https://forum.inductiveautomation.com/t/report-image-key/12870/3 "2017-04-03T01:52:25Z")

</div>

Hi Kathy,

The images are on disk on the Gateway (I can see them in the Image Management on the designer)

I’m only using an SQL query to generate a dynamic string that contains the filename of the image I want.  
So that every row in my report table has a different image corresponding to its SKU. Much like passing a parameter into a template repeater.

It seems that the Image Shape key in the reporting module is looking for a Datasource - generating one via an SQL query was the only way I could think of to reference a disk location dynamically.

Is there an easier way of dynamically referencing the Images on disk?

I apologise for my clumsy explanation, I’m probably doing this the hard way so it’s quite hard to explain.

Cheers  
Dan

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [April 3, 2017, 9:43pm UTC](https://forum.inductiveautomation.com/t/report-image-key/12870/4 "2017-04-03T21:43:34Z")

</div>

Unfortunately, we don’t get any more information about why getting the file failed.

The first thing I would look at is the path. Can you try putting in an absolute path? If that works, then you’re making a faulty assumption about where your relative root directory is. If it doesn’t work, you might want to check things like file permissions for the Ignition service.
