[Solved] Headsup on importing Base into Writer

Getting your data onto paper - or the web - Discussing the reports features of Base

[Solved] Headsup on importing Base into Writer

Postby victusinambitus » Fri Nov 02, 2018 10:23 am

I'm trying to import Base data into a Writer document. I have an odb database which I can create & understand reports and queries. I can register the Base file in Writer and F4 ok to see it connected. What I cannot determine is how to do the equivalent to a Mail Merge of my database into one document. I'm missing a step of logic in how to achieve this. My desired output (in HTML for demo purposes here only) would be something like
[record 1]
<table>[field1]<br>[field2]</table>
[page break]

[record 2]
<table>[field1]<br>[field2]</table>
[page break]
etc

Any clues where I can look to find help/instructions for this kind of output?
The closest I can get is to drag a query into the document and output as text, but I wish to format around the text.
Thanks in advance
Last edited by victusinambitus on Fri Nov 02, 2018 11:02 pm, edited 1 time in total.
OpenOffice 4.1 on Windows Vista
victusinambitus
 
Posts: 10
Joined: Thu Nov 20, 2014 9:33 am

Re: Headsup on importing Base into Writer

Postby Villeroy » Fri Nov 02, 2018 1:37 pm

Install the report builder extension. It can split database reports by means of page breaks. A database report is always stored within a Base document. However, after running a report the result can be stored as a stand-alone Writer document or PDF or any other text document format.
You have to group the record set by some field and then check the "keep together" property of that group. See documentation of the report builder extension. The tool is not trivial.

The extension for OpenOffice: https://extensions.openoffice.org/en/pr ... rt-builder
Here you find documentation on LibreOffice Base. LibreOffice comes with the report builder preinstalled: https://documentation.libreoffice.org/e ... tion/base/

This summer I wrote a macro which can split a report into multiple stand-alone text documents: https://forum.openoffice.org/en/forum/v ... 00&t=94514 (not trivial but should work with OpenOffice's "old style reports" as well)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26561
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Headsup on importing Base into Writer

Postby MrProgrammer » Fri Nov 02, 2018 8:18 pm

victusinambitus wrote:I'm trying to import Base data into a Writer document. … What I cannot determine is how to do the equivalent to a Mail Merge of my database into one document. … My desired output … would be something like <table>[field1]<br>[field2]</table>.
Create a Writer document with the pattern you want, which in this case seems to be <table><br></table>. Use View → Data Sources and nagivate to your table. Drag the Field1 and Field2 headers at the top of the screen down into your Writer document and drop them into <table>◊<br> and into <br>◊</table> where the diamond shows the destination for the drop. File → Print → Form letter → Yes → Records → All → Output → File → Single document → OK.

Read about Mail Merge in Help → Index or in User Guides (PDF) or searching for topics about it in the forum.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.5 Build 9789 on MacOS 10.11.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Volunteer
 
Posts: 3647
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Headsup on importing Base into Writer

Postby victusinambitus » Fri Nov 02, 2018 11:00 pm

Thank you MrProgrammer
That was the part I was missing exactly - you need to Print to File in order to get the merging function. Couldn't find that in the instructions/tutorials I was perusing.
Much appreciated!
OpenOffice 4.1 on Windows Vista
victusinambitus
 
Posts: 10
Joined: Thu Nov 20, 2014 9:33 am


Return to Reporting

Who is online

Users browsing this forum: No registered users and 1 guest