Jack Wallen shows you how to create a report from a LibreOffice database using built-in tools.
For most, the LibreOffice office suite is a way to create documents, spreadsheets, and presentations. However, there is a very powerful tool lying in wait for you to use: LibreOffice Base. Base is exactly what you think it is, a database tool. With it, you can do quite a bit--even connect to and manage a MySQL database.
One of the many handy features, included with LibreOffice Base is the report builder. With this tool you can create and run reports on any given LibreOffice Base database. I want to walk you through the steps of creating and running such a report. I will assume you already have LibreOffice installed and a database ready to use. I'll be demonstrating with LibreOffice 184.108.40.206 on Elementary OS, but the process is the same, regardless of platform. If you're using an older release of LibreOffice (pre 5.x), the layout and steps will vary. I highly recommend you update to the latest version of the software.
Do note, you must have a Java Runtime Environment (JRE) installed for the Reports tool to work. How you install the JRE will depend upon your platform. For example, on a Debian-based distribution (such as Ubuntu), you can install with a single command:
sudo apt-get install default-jre
Opening the database
The first thing you must do is open the database. To do that, open LibreOffice Base, select Open an existing database file (Figure A), select the database to be used from the drop-down, and click Finish.
The LibreOffice Base window will open with your database ready to use.
Creating a report
From the main window, click on the Reports icon in the left navigation (Figure B), and then click the Use Wizard to Create Report button.
In the pop-up window (Figure C), select the Table to be used for the report from the Tables or queries drop-down, and then click to select the fields you want to use in your report. To add fields, make sure they are selected and then click the >> button. When you have exactly the fields you want in the right pane, you can either click Finish (if you're in a hurry and just need the data), or click Next (to further configure your report).
If you clicked Next, you can then in the resulting windows, configure labeling, grouping, sort options, and layout. One nice feature about the extended configuration options is that you can choose a specific layout for your report. Available options are:
- Columnar, single-column
- Columnar, two-columns
- Columnar, three-columns
- In blocks, labels above
- In blocks, labels left
You can also select the orientation of your report in the layout window (Figure D).
Click Next, select if you want a Static or Dynamic report, and click Finish. The report will generate and you're ready to start working. By default, reports generate in read-only mode. There is an Edit Document button (top right corner of the report), which will reopen the report such that you can edit.
Your first report
Congratulations, you've just generated your first LibreOffice Base database report. Now that you understand how this is accomplished, you can start crafting extensive reports from all your databases. Enjoy that easy to read data.
- How to load styles from LibreOffice templates (TechRepublic)
- How to digitally sign a LibreOffice 6 document with GnuPG (TechRepublic)
- How to install LibreOffice 6 on Linux (TechRepublic)
- How to easily update styles on the fly in LibreOffice 5.4 (TechRepublic Video)
- How to record a macro and bind it to keyboard shortcuts in LibreOffice (TechRepublic)
- How to connect LibreOffice Base to a remote MySQL database (TechRepublic)
- LibreOffice, the best office suite, gets even better with LibreOffice 6.0 (ZDNet)