OT- Libreoffice - Base / Writer will this work?

Tommy Trussell tommy.trussell at gmail.com
Mon Dec 14 03:14:03 UTC 2015


On Sun, Dec 13, 2015 at 5:45 PM, P. Echols <p.echo926 at gmail.com> wrote:

>
>
> On Sun, Dec 13, 2015 at 12:16 PM, Tommy Trussell <tommy.trussell at gmail.com
> > wrote:
>
>>
>>
>> On Fri, Dec 11, 2015 at 1:15 PM, P. Echols <p.echo926 at gmail.com> wrote:
>>
>>> Greetings:
>>>
>>> Question is whether what I describe below is possible / reasonable using
>>> Libreoffice Base and Writer.  Part 1 is setting up the database, part 2 is
>>> importing data into writer, which is what I need.  Since Part 1 is time
>>> consuming, I don't want to start if I cannot get the desired result.
>>>
>>> I manage projects where I need to generate written reports, action
>>> requests, etc. with project specific information.  Because of my existing
>>> extensive library of forms, I need to stay with LO writer.
>>>
>>> I know it is possible to set up a database with a single table, each
>>> record having the data for one project.  Insert fields for that db into a
>>> template, and then open the template and select the particular record to
>>> populate.
>>>
>>> BUT, in my project, there are two items that require a list more
>>> appropriate for a linked table.  Imagine a report about an author.  Details
>>> specific to that author are from the "AuthorInfo" table, the author's
>>> bibliography is a separate table and publishers are another table.  I need
>>> to be able to generate a Writer template that will import the individual
>>> fields from the AuthorInfo table, but also allow inserting the bibliography
>>> and publisher info as if pasting in a spreadsheet.
>>>
>>> Has anyone done this?  I have a sense of the difficulty of Part 1, how
>>> difficult is Part 2?
>>>
>>>
>> No matter how complicated the database, if you can get the results into a
>> single table (the table can be the result of a Base query if you are
>> pulling data from other tables), then you can have Writer merge the fields
>> from that single table into multiple documents. Writer can "see" the
>> results from more than one table, but as far as I know it can only merge a
>> single table. Writer can also insert fields or change text based on
>> conditions (if - then - else).
>>
>> UNFORTUNATELY even though I have used it successfully for years (I have a
>> database of legal descriptions, terms, and payments and I produce contracts
>> and renewal letters annually), I will caution you that Writer is extremely
>> finicky and the tools for managing and updating the merge fields in Writer
>> are ugly. The conditional text is frustratingly picky on its syntax, too.
>>
>
> I have managed to do that and it works pretty well.
>
>
>>
>> It sounds like you are creating more of a directory (single document with
>> multiple data rows in it). I don't believe the mail merge tools are able to
>> insert new rows into tables, but it would be logical and useful if they
>> could. (I know you can set up a blank table and insert database contents
>> into it -- that's how the mailing label tools work.)
>>
>>
> What I am really trying to do is both, have a document that contains
> information from the basic information table sprinkled throughout, but
> includes a table populated by a linked table.  Do you know how to set up
> such a table in a document?  I have not found a guide that shows it.
>
>>
The only way I know is via a Calc spreadsheet. Create a spreadsheet whose
data links to the relevant table(s) in your database, and then embed the
Calc spreadsheet into the Writer document. I've seen several tutorials on
the web and YouTube for that one, though I haven't done it myself. I would
be curious how the spreadsheet data and the Writer linked data fields stay
in sync. (When you update embedded database fields, does Writer also update
the embedded spreadsheet? Are you sure you're looking at the new data and
not stale data from before the update. That's the sort of thing I would
suggest you test.)



> LibreOffice has a "Report Builder" tool available as a separate install.
>> (Install the libreoffice-report-builder package in Ubuntu.) Based on your
>> description, I would think Report Builder might help you, but I recall it
>> being similarly finicky and limited. It allows you to create a special
>> document populated with database fields. Once you install the
>> libreoffice-report-builder package (and restart LibreOffice if you had it
>> open), then open the database, Report Builder becomes visible as an option
>> from inside Base. I haven't tried it in awhile, though. If I understand
>> what you are looking for, you might have a look at the Report Builder and
>> see if it helps accomplish what you're looking to do.
>>
>
> I can certainly take a look at that.  My guess is that it will be even a
> steeper learning curve to get report builder to spit out the rather strict
> format that I'll need.  Maybe easier to use the database for the basic
> info, then simply use a spreadsheet table to save the secondary table and
> cut and paste as I have done in the past.  Silly, but it works.
>

If it were a one-off job, copy and paste is the easiest way to do it. If
you are updating the database frequently and re-publishing the document,
you definitely want to automate it. Copying and pasting updated database
tables would make me go cross-eyed if I had to do it a lot, and having the
updates link directly into a Writer document would be ideal.

I am glad you are finding some success! Since I do my task annually, it
seems like I have to fiddle with everything every year. Watch out for
things like database fields going "stale," displaying old data, or not
respecting updated database conditional text. In my case this may be
because I archive the old and copy all the documents to a new directory
every year rather than keeping them in a single place. LibreOffice makes it
inconvenient to see the full path of embedded fields (especially tough if
they're in space-constrained cells in Writer). It might also be because at
least every couple of years I'm going to be using a totally new version of
LibreOffice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20151213/79a9ecde/attachment-0001.html>


More information about the ubuntu-users mailing list