O'Reilly logo

iReport 3.7 by Shamsuddin Ahammad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Working with Images

In a software application, images have various uses. Some images are used for viewing as a logo and some are stored as binary data in the database. For example, a client's photograph can be stored in the database as binary data.

In this chapter, we shall:

  • Learn how to display images from the database
  • Learn how to display a static image from the hard drive
  • Learn how to set a background image in a report

So let's get on with it.

Displaying an image from the database

To store an image as data in the database, the required data type is BLOB or LONGBLOB. BLOB stands for Binary Large Object, which can store large images or binary data.

In our database, the Product table has an attribute Image of type LONGBLOB. We will display ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required