Question about mysql transfer

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
oneindelijk
Posts: 7
Joined: Wed Sep 03, 2014 9:31 am

Question about mysql transfer

Post by oneindelijk »

Sorry, I don't know how to describe my guestion in a better way, suggestions are welcome...

In order to make an invoice with the Oracle Report Builder, I created a view that combines all the necessary fields into one big table.
So for each item on the invoice, duplicate entries like name, invoicenr etc are send by the server.

On the invoice I have hardcoded the company logo in the header of the page.
The issue with this, is that the path of the image is absolute, so other users end up having no image in the report.
To solve this, I want to use images from the database instead, but I assume that inserting this logo in the view would result in a large amount of data being sent,
as I suppose a copy of the logo would be sent for every row..

Is this correct and if so, how can I solve this ?
Is there for example a way to insert a 2nd query in the report that only retrieves 1 row for the image ?

thank for the help !
OpenOffice 5.1 on Ubuntu 16.04
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Question about mysql transfer

Post by UnklDonald418 »

I don't believe that the Report Builder is able to accept data from more than one data source on a single report.
I've been looking at something similar to your problem and here is a solution that seems to work for me.
I created a table Logo with only one record that has a field to contain the Logo image.
Next I created a query that included all the data fields for my report plus a column for the Logo image.
Then I used the query as the data source for my report. The Logo image was one of the available fields that I placed in a graphics box on the Report Header.

Using this approach there is only one copy of the image stored in the table and not in some external URL location.

I don't know how the database engine allocates memory or what sorts of optimizations it does so it may keep a copy of the Logo image in memory for each row in my report. I suppose if the report was long enough and/or the image was extremely large that could become an insufficient memory issue.
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
Post Reply