Jump to content

Jasper Images from DB ..


Recommended Posts

By: legion - cajinadiaz

Jasper Images from DB ..

2006-03-28 14:14

Hi friends..

I need display a image stored in Oracle DB as ORDSYS.ORDIMAGE data type.. I guess that it's the same as BLOB data type..

 

Please tell me step to step how show this kind of data....

 

Thanks..

 

 

By: Code_Slave - code_slave

RE: Jasper Images from DB ..

2006-03-28 14:52

even though you are not being 100% clear.

 

1. pull the blob from the database using a java BufferedImage.

(10 lines of code)

2. stick it in a temp file using imageio , encoding it either as a png/jpeg ( 1 line of code)

3. put the images or a pointer into a hashmap.

(5 lines of code)

4. pass the hashmap to the Jasperreport

5. inside the jasper report , have an image field that refers to the parameter in hte hashmap.

 

 

 

 

 

By: Code_Slave - code_slave

RE: Jasper Images from DB ..

2006-03-28 14:58

oh!, i forgot, personally i would not screw about with ORDSYS.ORDIMAGE

you can get the stuff in, but getting the stuff out is a pig, and it is an extra layer of code , slowing down your retreval of info.

 

just setup your own blob field & some misc keys and flags , and do it yourself.

(then when oracle sorts out (ORDSYS.ORDIMAGE), you can always transfer your blobs into their system.

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...