0

I am using iReport 5.0 and I am trying to insert picture from database.

The picture is stored in PostgreSQL in a bytea type field

I already tried solution, but it does not work

If I use JRImageLoader.loadImage((byte[])$F{slike}) in image expression I get an error:

Caused by: groovy.lang.MissingPropertyException: No such property: JRImageLoader for class: report_slika_1381233045022_689567 

I also following post, but it does not give me any results

Any suggestions?

Community
  • 1
  • 1
Yebach
  • 1,661
  • 8
  • 31
  • 58
  • Did you try to use the *Java* language in report? Did you add *JRImageLoader* to classpath? – Alex K Oct 08 '13 at 12:31
  • in Jasper report properties I added net.sf.jasperreports.engine.util.JRImageLoader if that is the deal, but it still wont print the picture – Yebach Oct 09 '13 at 07:04
  • Would you try to map the field as java.io.InputStream – Tex Mar 03 '17 at 21:33

1 Answers1

1

In your report properties, set language set Java instead Groovy.

Add the following imports

net.sf.jasperreports.engine.util.JRLoader

net.sf.jasperreports.engine.util.JRImageLoader

Tex
  • 305
  • 2
  • 16