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
[Solved] Headsup on importing Base into Writer
-
- Posts: 10
- Joined: Thu Nov 20, 2014 9:33 am
[Solved] Headsup on importing Base into Writer
Last edited by victusinambitus on Fri Nov 02, 2018 11:02 pm, edited 1 time in total.
OpenOffice 4.1 on Windows Vista
Re: Headsup on importing Base into Writer
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: viewtopic.php?f=100&t=94514 (not trivial but should work with OpenOffice's "old style reports" as well)
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: viewtopic.php?f=100&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 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
- MrProgrammer
- Moderator
- Posts: 5097
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Headsup on importing Base into Writer
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.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>.
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.7 Build 9800, MacOS 13.7, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.7, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
-
- Posts: 10
- Joined: Thu Nov 20, 2014 9:33 am
Re: Headsup on importing Base into Writer
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!
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