<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 1:15 PM, P. Echols <span dir="ltr"><<a href="mailto:p.echo926@gmail.com" target="_blank">p.echo926@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Greetings: <br><br></div>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.<br><br></div>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.<br><br></div>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.  <br><br></div>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.<br><br></div>Has anyone done this?  I have a sense of the difficulty of Part 1, how difficult is Part 2?<br></div>
<br></blockquote><div> </div></div>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).</div><div class="gmail_extra"><br></div><div class="gmail_extra">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. </div><div class="gmail_extra"><br></div><div class="gmail_extra">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.)</div><div class="gmail_extra"><br></div><div class="gmail_extra">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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I don't intend to pour cold water on your idea -- I think you can probably be successful -- as long as you recognize the data merging and all-around database integration is a weak point in LibreOffice / OpenOffice, and you will certainly encounter some difficulties getting it set up. </div><div class="gmail_extra"><br></div><div class="gmail_extra">Oh and if you don't already know about it, you might find useful information (and some sample files) here:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://wiki.documentfoundation.org/Documentation/Publications#LibreOffice_Base_Handbook">https://wiki.documentfoundation.org/Documentation/Publications#LibreOffice_Base_Handbook</a><br></div></div>