embed database data in odt file

 the problem

In odt it is possible to insert some database data as fields in a odt file, but when you change data in phpmyadmin I get
1) a correct update in the data source view above the text,
2) not in the odt file (body: where
are the fields): the fields texts remain unchanged, even after doing the
command “update fields” (both from menu and from keyboard: F9, or
shift+ctrl+F9).

a solution

A workaround is to use insert – section to insert a part of a php file via localhost.

  1. you will see in your odt file the content of the (section=div, of the) php file, as in the picture following:
    image description
  2. insert -> section -> link -> file name “http://localhost/[path]/[filename].php” -> section (the “id” name you have chosen in php file, i.g. inserting a <div id=”biblio”>[php/mysql code]</div> the section name will “biblio”)

Of course, you must previously

  • activate a php/mysql server in local
  • and possibly have some knowledge of html/php source code.

link, rather than embed images in odb file

Today I followed this way: link rather than embed the images, so that the odb file can remain of small size.
1. in edit view add a text box in your form and
2. convert it (replace with) to a image control
3. in normal view double click on the new box and select the image, which will not embedded, but linked.

with mysql

If you use a mysql database you can set the field as varchar (at least 150 char) and insert the location, such as http://localhost/your-path/yourfile.jpg.
Then you can add this field as data in the text box (as above).