[Solved] Database stored images in Oracle reports

Getting your data onto paper - or the web - Discussing the reports features of Base

[Solved] Database stored images in Oracle reports

Postby lewisbarry92 » Sun Apr 01, 2018 5:33 am

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
lewisbarry92
 
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: Database stored images in Oracle reports

Postby longi » Sun Apr 01, 2018 6:41 pm

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
longi
 
Posts: 108
Joined: Mon Jul 15, 2013 5:04 pm

Re: Database stored images in Oracle reports

Postby F3K Total » Sun Apr 01, 2018 6:48 pm

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 160 times
    MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
    my current system
  • Windows 7 OOo, AOO, LOLinux Mint OOo, AOO, LO
F3K Total
Volunteer
 
Posts: 934
Joined: Fri Dec 16, 2011 8:20 pm

Re: Database stored images in Oracle reports

Postby UnklDonald418 » Sun Apr 01, 2018 7:31 pm

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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1237
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Database stored images in Oracle reports

Postby lewisbarry92 » Sun Apr 01, 2018 8:15 pm

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 79 times
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

Postby Villeroy » Sun Apr 01, 2018 9:13 pm

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, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27296
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Database stored images in Oracle reports

Postby UnklDonald418 » Sun Apr 01, 2018 9:15 pm

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 90 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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1237
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Database stored images in Oracle reports

Postby longi » Sun Apr 01, 2018 9:53 pm

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
longi
 
Posts: 108
Joined: Mon Jul 15, 2013 5:04 pm

Re: Database stored images in Oracle reports

Postby lewisbarry92 » Mon Apr 02, 2018 1:21 am

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
lewisbarry92
 
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: Database stored images in Oracle reports

Postby UnklDonald418 » Mon Apr 02, 2018 1:42 am

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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1237
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Database stored images in Oracle reports

Postby lewisbarry92 » Mon Apr 02, 2018 1:49 am

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
lewisbarry92
 
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: Database stored images in Oracle reports

Postby UnklDonald418 » Mon Apr 02, 2018 2:39 am

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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1237
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Database stored images in Oracle reports

Postby lewisbarry92 » Mon Apr 02, 2018 3:43 am

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

Postby lewisbarry92 » Mon Apr 02, 2018 5:06 am

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
lewisbarry92
 
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm

Re: Database stored images in Oracle reports

Postby UnklDonald418 » Mon Apr 02, 2018 5:28 am

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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1237
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: [Solved] Database stored images in Oracle reports

Postby lewisbarry92 » Mon Apr 02, 2018 4:46 pm

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
lewisbarry92
 
Posts: 15
Joined: Sat Nov 10, 2012 11:05 pm


Return to Reporting

Who is online

Users browsing this forum: No registered users and 2 guests