Jump to content
We've recently updated our Privacy Statement, available here ×

BLOB Images Fields.. ??


Recommended Posts

By: legion - cajinadiaz

BLOB Images Fields.. ??

2006-03-24 07:10

Hello.. I need show a image on a jasperreport designed in iReport..

The DB is Oracle and the image field is Blob data type..

I can show this type of data as image on my report ??

 

 

 

 

By: macoute3 - macoute3

RE: BLOB Images Fields.. ??

2006-03-25 23:58

use JRImageRenderer.getInstance(byte[])

 

 

 

 

By: Teodor Danciu - teodord

RE: BLOB Images Fields.. ??

2006-04-10 07:16

 

Hi,

 

You could simply declare the report field as of

type java.awt.Image or java.io.InputStream and use

it in the image expression.

 

I hope this helps.

Teodor

 

 

 

 

 

By: develito - devel2k5

RE: BLOB Images Fields.. ??

2006-04-10 16:08

Hi..

 

I have a similar problem with Images stored in a Oracle Database. I have a ORDIMAGE data type and when I try to display it in a report "iReport" say:

 

java.sql.SQLException: Fallo al construir el descriptor: Unable to resolve type "ORDSYS.ORDIMAGE" at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:180) at oracle.sql.TypeDescriptor.getTypeDescriptor(TypeDescriptor.java:411) at oracle.jdbc.driver.NamedTypeAccessor.otypeFromName(NamedTypeAccessor.java:68) at oracle.jdbc.driver.TypeAccessor.initMetadata(TypeAccessor.java:76)

....

 

---------------------------------------------

I am raising a solution that is to return in the query a BLOB data type from the ORDIMAGE... but I'm not sure if it work..

This the configuration of may report:

The report field (from the query) of the Image is of type java.awt.Image ..

In the field of the "Image tool" I have the Image Expression Class as: java.awt.Image

 

 

 

Any Suggestion.. ??

 

 

 

 

 

By: develito - devel2k5

RE: BLOB Images Fields.. ??

2006-04-25 09:05

I find the solution..!!

 

To display a Image stored in Oracle DB (in my case) as ORDSYS.ORDIMAGE data type, only make a query like this:

 

SELECT table_alias.picture.getContent() FROM MY_TABLE table_alias

 

As Teodor saw.. in the report field (the query field) put "java.awt.Image" and in the image component field .. put the same object type: java.awt.Image..

 

_______________________________

PD: Sorry for may English.. :) |

-------------------------------

 

 

 

 

By: Dave G - dgarratt

RE: BLOB Images Fields.. ??

2006-04-25 14:44

Test

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...