[Solved] Database stored images in Oracle reports

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
lewisbarry92
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

[Solved] Database stored images in Oracle reports

Post by lewisbarry92 »

Hi All, I have a quick question...

I have a little database, in it, I have a table where I store a few images. I'm building a report where I would like to display these images along with some other data also stored in the same table.

Is this possible?

I'm not talking about inserting a static image into the header or the footer as a logo of sorts, I'm talking about pulling an image into the report same as pulling a stored birthday or name field.

Currently, my Oracle Report pulls the image field from my table (view), converts it to a formatted text field and displays a "0" in the image field when I run the report. I did a quick test, trying to pull the image field directly from the table rather than the view, but it made no difference.

Thanks in Advance,

Barry
Last edited by Hagar Delest on Mon Apr 02, 2018 12:18 pm, edited 1 time in total.
Reason: tagged solved.
OpenOffice 4.1.5 Split Database on Windows10
longi
Posts: 110
Joined: Mon Jul 15, 2013 5:04 pm

Re: Database stored images in Oracle reports

Post by longi »

Hi!
I've just tried it in a database I made some time ago with some images and ORB gets them properly.
Maybe we need more specific information or a little example.

Bye! ;)
OpenOffice 4.1.5 on Windows 10
LibreOffice 5.1 on Windows 7
LibreOffice 6.0.1 on Windows10
F3K Total
Volunteer
Posts: 1040
Joined: Fri Dec 16, 2011 8:20 pm

Re: Database stored images in Oracle reports

Post by F3K Total »

Hi,
for internal and external images, i don't see any problems as well. The internal version will be corrupt after adding some more pictures. I would prefer the external version.
Find an example attached.
R
Attachments
Images_in_Report_Database.zip
just unpack, and keep the images folder next to the .odb file
(37.27 KiB) Downloaded 990 times
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
UnklDonald418
Volunteer
Posts: 1558
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Database stored images in Oracle reports

Post by UnklDonald418 »

I tried both data sources, a table and a view and had no problem displaying embedded graphics objects on an ORB report.
Currently, my Oracle Report pulls the image field from my table (view), converts it to a formatted text field and displays a "0" in the image field when I run the report.
If you don't have an Image Control in the details area of your report form the use Insert->Report Controls-> Image to add one. Select the Image Control you just added and looking at the Data tab in the Properties dialog select the name of your image column from the list in the Data Field property.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
lewisbarry92
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: Database stored images in Oracle reports

Post by lewisbarry92 »

UnklDonald418 wrote:If you don't have an Image Control in the details area of your report form the use Insert->Report Controls-> Image to add one. Select the Image Control you just added and looking at the Data tab in the Properties dialog select the name of your image column from the list in the Data Field property.
Hi UnklDonald418!! Good to see you again! I don't have the path: Insert -> Report Controls -> Image I have instead: Insert -> Report Controls -> Graphic

It does add and image control field to the detail section, I selected the name of the image column and everything looks cool. But, now when I run the report, nothing shows up....the "0" isn't there. Another, quick, stupid question. What image types, i.e. JPEG, PNG, BMP, etc. are allowed? I'm using JPEG's at the moment, cause that's what I had handy. Could this be the problem?
Attachments
ImageReportProblem2.odt
This is what I created for testing
(85.53 KiB) Downloaded 756 times
OpenOffice 4.1.5 Split Database on Windows10
User avatar
Villeroy
Volunteer
Posts: 31323
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Database stored images in Oracle reports

Post by Villeroy »

Why do you attach a picture instead of the database document?
And why do you embed the picture in a text document?
Bizarre.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
UnklDonald418
Volunteer
Posts: 1558
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Database stored images in Oracle reports

Post by UnklDonald418 »

I used .jpg files in my tests. Here are screen shots of both the Data and General tabs of the properties dialog on my little test report.

In the long run, the approach that F3K Total uploaded is the best way.
Attachments
ImageReportTest.odt
(114.57 KiB) Downloaded 822 times
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
longi
Posts: 110
Joined: Mon Jul 15, 2013 5:04 pm

Re: Database stored images in Oracle reports

Post by longi »

Those pictures don't permit me to figure out what the problem is.
Maybe the problem is based on the way they had been inserted in the database table and it is not an ORB problem.
OpenOffice 4.1.5 on Windows 10
LibreOffice 5.1 on Windows 7
LibreOffice 6.0.1 on Windows10
lewisbarry92
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: Database stored images in Oracle reports

Post by lewisbarry92 »

longi wrote: Maybe the problem is based on the way they had been inserted in the database table and it is not an ORB problem.
This image thing should be a no brainer. I have the image control in the report and it is set up exactly the same as UnklDonald418 showed. It's just not working. I have a form, that I created in AOO that inserts all the data into my tables. Everything works great, images are stored and retrieved in the form flawlessly. :crazy:
OpenOffice 4.1.5 Split Database on Windows10
UnklDonald418
Volunteer
Posts: 1558
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Database stored images in Oracle reports

Post by UnklDonald418 »

Have you tried creating a new report using the Wizard?
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
lewisbarry92
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: Database stored images in Oracle reports

Post by lewisbarry92 »

Yeah I tried that....
a quick question....I just noticed that my image is stored in the table as a BLOB rather than the IMAGE datatype. Remember, I copied and pasted the table into the new split database. It looks like it changed the datatype....could this be it?
OpenOffice 4.1.5 Split Database on Windows10
UnklDonald418
Volunteer
Posts: 1558
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Database stored images in Oracle reports

Post by UnklDonald418 »

Ok, NOW I see your problem. Apparently, we were all using Embedded databases for our tests, but somehow, ORB doesn't know what to do with embedded images in a Split database. However, you can use the linked images like F3K Total showed in his example.
Add a text field to your database to store the URL of your image file. On your form use the text field as the Data Source for the Image control and then you can store the URL in the text field using Insert graphics from.
If you are using a View as the data source for your report you may need to edit the View to include the new text field. Now, if you use the text field as the Data Field on the Image control in your report it should display the image.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
lewisbarry92
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: Database stored images in Oracle reports

Post by lewisbarry92 »

OK...now we're getting somewhere. I just really hoped that it was something stupid I was missing. I'm planning on a picture database down the road a ways where I will utilize the approach just outlined by you and F3K Total. For now, I'll make the changes to store the URL as well and give it a go, and let you know how it turns out.

Thank you to everybody for their input!
Barry
OpenOffice 4.1.5 Split Database on Windows10
lewisbarry92
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: Database stored images in Oracle reports

Post by lewisbarry92 »

Yippee! Storing the URL worked! My images are now showing up in my report!! I'm still going to save the image in the db as well as the external file, in the hope that someday storing images in the split db will work like the embedded db does.

I have one more questions...
Where is the best place to store the images folder with regard to the split database configuration and portability of the whole app.
OpenOffice 4.1.5 Split Database on Windows10
UnklDonald418
Volunteer
Posts: 1558
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Database stored images in Oracle reports

Post by UnklDonald418 »

I only have one database that includes images, so I may not be the best person to answer.
I created an images sub-directory alongside the database and driver sub-directories in my Split database. That way if I need to zip the database for a backup or to move it to another machine the images are included in the archive.
For the pro's and con's of storing images in the database see the following discussion
[Tutorial] Pictures in Base
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
lewisbarry92
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: [Solved] Database stored images in Oracle reports

Post by lewisbarry92 »

Once again, UnklDonald418, your help has been invaluable!! Thank you!!
And thanks to everyone who joined in the discussion here, your input was very much appreciated!

Barry
OpenOffice 4.1.5 Split Database on Windows10
Post Reply