# Display image from Database In REPORT

**URL:** <https://forum.inductiveautomation.com/t/display-image-from-database-in-report/22292>\
**Category:** Ignition\
**Created:** [February 1, 2019, 5:14pm UTC](https://forum.inductiveautomation.com/t/display-image-from-database-in-report/22292 "2019-02-01T17:14:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![juang](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@juang](https://forum.inductiveautomation.com/u/juang)\
**Post date:** [February 1, 2019, 5:14pm UTC](https://forum.inductiveautomation.com/t/display-image-from-database-in-report/22292/1 "2019-02-01T17:14:42Z")

</div>

Hello, i know there are other topic with the same question, but i have tried to get it to work and i can’t

I’m using SQL Server.  
have a column id(int),imagedata(image)

i believe the storing of the image i got correct as it was saved in the sql database.

but i can’t retrieve the image , i really do not know how to do it, and i have spent to much time with it, so if anyone would be so kind to guide me step by step, it would be great. i tried using some code in another topic with a label component. but again, i don’t know where that scripting would go.

anybody has tried to this in ImageShape in the report designer?

any help?

---

<div class="post-metadata">

**Author:** ![juang](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@juang](https://forum.inductiveautomation.com/u/juang)\
**Post date:** [February 1, 2019, 6:31pm UTC](https://forum.inductiveautomation.com/t/display-image-from-database-in-report/22292/2 "2019-02-01T18:31:11Z")

</div>

Finally got it to work on the report.  
i used a script. to run the query. and set the datakey to that query.

image = system.db.runScalarPrepQuery(“SELECT imagefile FROM imagetable where id=7”)  
data[‘myKey’]= image

---

<div class="post-metadata">

**Author:** ![Jeevitha\_M](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jeevitha\_M](https://forum.inductiveautomation.com/u/Jeevitha_M)\
**Post date:** [December 15, 2022, 7:58am UTC](https://forum.inductiveautomation.com/t/display-image-from-database-in-report/22292/3 "2022-12-15T07:58:11Z")

</div>

Can you please share screenshot to know the exact place to insert the query
