Ask Your Question

Input images in Base report using relative links

asked 2020-11-05 16:51:26 +0100

greb gravatar image


I didn't find a solution for my current issue:
(for information, I used LibreOffice 7 with a Firebird embedded database, on a Debian desktop).
In a report (Base), I want to display pictures that are not attached in the database but referenced through their file name.

Based on this thread, I could correctly display a picture in the report, by providing the full file path in the adequate field.

But what I would like is to work with relative path better than full absolute links (note: picture are stored locally, not online).
Indeed, the database+pictures folder will be shared to other people, using different desktop OS, and probably placed in different locations in the target computers.
In other words, I would like that the report adequately display the pictures if the working folder is placed for example in:
- /home/greb/documents/database/, and
- C:\Documents\Current_jobs\material\

Is there a way maybe through the formula function in the "Data field" field of the image control?
(Ive tried the URLENCODE function, but not sure that it's the appropriate function, and don't know how to use…)

Thanks a lot in advance for any help or tip!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-11-05 19:41:24 +0100

Ratslinger gravatar image


Relative links seem to work just fine. Using Ubuntu 20 with LO v7.0.2.2 Firebird embedded.

Have MyPictures directory in same location as Base file. Have PictureZip/picture_links one level up. These links work in both forms and reports:



Also copied & moved to a different location without problem.

edit flag offensive delete link more


When entering new images on a form (links not embedded), relative location is saved.

Also did quick test on Win 10 - no obvious problems using same files copied over to there.

Ratslinger gravatar imageRatslinger ( 2020-11-05 19:43:26 +0100 )edit

Hello @Rastlinger
Thanks a lot for your help.

I've tried it following your exact folder structure with a new test Base file and indeed, it works.

The thing is in this test Base file, i've created the table to be displayed in the report (with a VARCHAR field for the picture path), while in my working file, what is used for the report is a view (designed query).
I don't know why, the field containing the image path yielded with a lot of space at the end… (and the field relating to the image path is a CHAR one, but don't know if involved in the issue).
Using the TRIM() function resolved my problem (and also produced a VARCHAR field).

greb gravatar imagegreb ( 2020-11-06 09:54:09 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-11-05 16:51:26 +0100

Seen: 43 times

Last updated: Nov 05 '20