Inserting a single record from a database into a writer document

I would like to insert the content of a table cell from a database to a Writer document.
I’ve tried using fields, but the window (CTRL+F2) → Database doesn’t allow to select a record of the table (column and row), only the column. I need to insert similar fields many times, usually the column is the same, but the row is content dependent, I need to have the possibility to choose which particular “cell” goes where.

another further step would be to use a variable defining the table column for each of these particular fields.
Is it possible?

Hi

If I understand well, you can :

  • Display the datasources: ViewData Sources
  • Unfold you source, select the record
  • Click Data to Text in the toolbar of data sources
  • Choose how to insert (table, field, text)
  • Choose the field to be inserted (you can select style)

Regards

1 Like

This is exactly what I was looking for.
thank you very much!

This implementation is partial since the inserted fields don’t get updated with F9 if the field in the database changes. The field in the document is indeed a text string with uncomplete reference to the exact source cell of the database, therefore it is technically impossible for LibreOffice to update the content. There’s a bug involving the bibliography with the same behaviour, it is reported here: https://bugs.documentfoundation.org/show_bug.cgi?id=60232