Writer document print shows only fields from one table of base.odb, though i have datas in three tables

Hello, I’m writing a libreoffice writer 6.2.7.1 document, for two environments, P1 and P2.
my integrated HSQLBD type .odb database contains 3 tables, with different content specific to each environment.
In the text document, with ctrl + shift + f4, I select the fields of the different tables that I want to insert.
They appear well on a gray background. if I do ctrl + F9, I see dbname.tablename.fieldname for each of them.
After printing → print a form letter → two separate files, Only the data from a table appears,
the one selected by default in the mailing assistant menu.
How to have all the fields of all the tables translated?
Thanks for your help.
Peter
Annual_dbupgrade.odt (9.0 KB)
This is the writer document
P21.odt (8.9 KB)
this is the print for P2 site, without field oracle_home.

I can only upload Two links as new user. one table contains dbnames and accounts, whiche are displayed correctly. oracle_home from second table are not displayed.

Would be good to have an example here (database and Writer document). Hope it isn’t a bug of this old version LO 6.2 …

For example, table dbnode contains one line with p1dbsrv01 p1dbsrv02 etc . another line with p2dbsrv01 p2dbsrv02 …
table orahome contains one line with /u01/app/P1/19c and other dbhome, accounts… and another line with /u01/app/P2/12c and others.
In my writer document i insert fields dbnode1 and dbhome1, titles of the first column of each table.
I print the document in separate files, and it shows only the dbnode names, p1dbsrv01 p1dbsrv02, the home remains as base.orahome.dbhome, the same for P2, showing only p2dbsrv01 p2dbsrv02 …

I hope it is more clear,
regards
Peter

Without the database it is impossible to see any problem there.

You could move database file and *.odt-files into a folder and load up this as a *.zip-file. So I could test if I will see content, which isn’t filled with data of a table.

Had a look at the database. There is no connection between the two tables visible for Writer. Connect the two tables in a query like

SELECT "Tdbnode".*, "Torahome".* 
FROM "Torahome", "Tdbnode" WHERE "Torahome"."site" = "Tdbnode"."site"

or, better

SELECT "Tdbnode".*, "Torahome"."orahome1", "Torahome"."orahome2", 
"Torahome"."orahome3", "Torahome"."version" 
FROM "Torahome", "Tdbnode" WHERE "Torahome"."site" = "Tdbnode"."site"

because there is a field called “site” in both tables.
Set this query as the data source of your form letter.

i have uploaded 2 files, the source document and one print. i cannot upload more as new user.
Let me know if you need more informations.

regards

Thank you Robert, it sounds fine, but even when i set this request as data source, orahome fields are not set in the printed document.
may be i should upgrade writer version ?

regards


base.odb (4.2 KB)

zip files are not authorized for uploading, but here is the base
base.odb (3.9 KB)

The query “merge.sql” shows the whole content. Did you change all fields in the Writer document to the new data source? This I couldn’t see in the screenshot.
Annual_dbupgrade.odt (10.6 KB)

Hello @RobertG , thinking again about it, no, i didn’t change all fields in my writer document. I will try it again.
Meanwhile, i solved the problem by using only one big table, which works fine.

Thank you again for your help.

regards
Peter

Yes, @RobertG solution works, i had to replace the fields from the tables by the fields from the query which merge the tables.

Thank you again.
peter