Report Image Key

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

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?

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

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.