«Base Handbook Copyright This document is Copyright © 2013 by its contributors as listed below. You may distribute it and/or modify it under the ...»
This document is Copyright © 2013 by its contributors as listed below. You may distribute it and/or
modify it under the terms of either the GNU General Public License
(http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution
License (http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.
All trademarks within this guide belong to their legitimate owners.
Jochen Schiffers Robert Großkopf Jost Lange Hazel Russman Martin Fox Andrew Pitonyak Dan Lewis Jean Hollis Weber Acknowledgments This book is based on an original German document, which was translated by Hazel Russman and Martin Fox.
Please direct any comments or suggestions about this document to:
email@example.com Publication date and software version Published 3 July 2013. Based on LibreOffice 4.0.
Documentation for LibreOffice is available at http://www.libreoffice.org/get-help/documentation Contents Copyright
Publication date and software version
Who is this book for?
What's in this book?
Where to get more help
Free online support
Paid support and training
What you see may be different
Using LibreOffice on a Mac
What are all these things called?
Who wrote this book?
Frequently asked questions
Chapter 1 Introduction to Base
Base – a container for database content
Data input using forms
Data input directly into a table
Queries – getting information on data in tables
Reports – presentation of data
Chapter 2 Creating a Database
General notes on the creation of a database
New database using the internal HSQL engine
Accessing external databases
Thunderbird address book
Chapter 3 Tables
General information on tables
Relationships between tables
Relationships for tables in databases
Tables and relationships for the example database
Creation using the graphical user interface
Direct entry of SQL commands
Base Handbook 3 Linking tables
Entering data into tables
Entry using the Base GUI
Direct entry using SQL
Problems with these data entry methods
Chapter 4 Forms
Forms make data entry easier
A simple form
Toolbars for form design
Properties of controls
A simple form completed
Main forms and subforms
One view – many forms
Chapter 5 Queries
General information on queries
Creating queries using the Query Design dialog
Query enhancement using SQL Mode
Using an alias in a query
Queries for the creation of list box fields
Queries as a basis for additional information in forms
Data entry possibilities within queries
Use of parameters in queries
Queries as source tables for queries
Summarizing data with queries
More rapid access to queries using table views
Chapter 6 Reports
Creating reports using the Report Builder
The user interface of the Report Builder
General properties of fields
Data properties of fields
Functions in the Report Builder
Formula entry for a field
Chapter 7 Linking to Databases
General notes on database linkage
4 Base Handbook Registration of databases
Data source browser
Data to Text
Data to Fields
Data source of current document
Creating mail merge documents
Direct creation of mail merge and label documents
Mail merge using the mouse
Creating form letters by selecting fields
Database use in Calc
Entering data into Calc
Exporting data from Calc into a database
Converting data from one database to another
Chapter 8 Database tasks
General remarks on database tasks
Searching for data
Getting someone's current age
Getting a running balance by categories
Getting a line break through a query
Grouping and summarizing
Chapter 9 Macros
General remarks on macros
Automatic updating of forms
Searching data records
Comboboxes as listboxes with an entry option
Navigation from one form to another
Removing distracting elements from forms
Database tasks expanded using macros
Making a connection to a database
Securing your database
Decreasing the table index for autovalue fields
Chapter 10 Database Maintenance
General remarks on maintaining databases
Compacting a database
Base Handbook 5 Querying database properties
Testing tables for unnecessary entries
Testing entries using relationship definition
Editing entries using forms and subforms
Queries for finding orphan entries
Database search speed
Effect of queries
Effect of listboxes and comboboxes
Data types for the table editor
Built-in functions and stored procedures
Information tables for HSQLDB
Database repair for *.odb files
Connecting a database to an external HSQLDB
Changing the database connection to external HSQLDB
Changing the database connection for multi-user access
Auto-incrementing values with external HSQLDB
What's in this book?
This book introduces Base, the database component of LibreOffice. Base uses the HSQLDB database engine to create database documents. It can access databases created by many database programs, including Microsoft Access, MySQL, Oracle, and PostgreSQL. Base includes additional functionality that allows you to create full data-driven applications.
This book introduces the features and functions of Base, using two example databases.
• Creating a database
• Accessing external databases
• Creating and using tables in relational databases
• Creating and using forms for data entry
• Using queries to bring together data from different tables, calculate results where necessary, and quickly filter a specific record from a mass of data
• Creating reports using the Report Builder
• Linking databases to other documents and external forms, including use in mail merge
• Filtering and searching data
• Using macros to prevent input errors, simplify tasks, and improve usability of forms
• Maintaining databases Where to get more help This book, the other LibreOffice user guides, the built-in Help system, and user support systems assume that you are familiar with your computer and basic functions such as starting a program, opening and saving files.
Help system LibreOffice comes with an extensive Help system. This is your first line of support for using LibreOffice. To display the full Help system, press F1 or select LibreOffice Help from the Help menu. In addition, you can choose whether to activate Tips, Extended Tips, and the Help Agent (using Tools Options LibreOffice General).
If Tips are enabled, place the mouse pointer over any of the icons to see a small box (“tooltip”) with a brief explanation of the icon’s function. For a more detailed explanation, select Help What's This? and hold the pointer over the icon.
Free online support The LibreOffice community not only develops software, but provides free, volunteer-based support.
See Table 1 and this web page: http://www.libreoffice.org/get-help/ You can get comprehensive online support from the community through mailing lists and the Ask LibreOffice website. Other websites run by users also offer free tips and tutorials. This forum provides community support for LibreOffice: http://en.libreofficeforum.org/
Paid support and training Alternatively, you can pay for support services. Service contracts can be purchased from a vendor or consulting firm specializing in LibreOffice.
What you see may be different Illustrations LibreOffice runs on Windows, Linux, and Mac OS X operating systems, each of which has several versions and can be customized by users (fonts, colors, themes, window managers). The illustrations in this guide were taken from a variety of computers and operating systems. Therefore, some illustrations will not look exactly like what you see on your computer display.
Also, some of the dialogs may be differ because of the settings selected in LibreOffice. You can either use dialogs from your computer system (default) or dialogs provided by LibreOffice. To
change to using LibreOffice dialogs:
1) On Linux and Windows operating systems, go to Tools Options LibreOffice General on the main menu bar to open the dialog for general options.
2) On a Mac operating system, go to LibreOffice Preferences General on the main menu bar to open the dialog for general options.
3) Select Use LibreOffice dialogs in Open/Save dialogs and, in Linux and Mac OS X operating systems only, Print dialogs to display the LibreOffice dialogs on your computer display.
4) Click OK to save your settings and close the dialog.
Using LibreOffice on a Mac Some keystrokes and menu items are different on a Mac from those used in Windows and Linux.
The table below gives some common substitutions for the instructions in this chapter. For a more detailed list, see the application Help.
What are all these things called?
The terms used in LibreOffice for most parts of the user interface (the parts of the program you see and use, in contrast to the behind-the-scenes code that actually makes it work) are the same as for most other programs.
A dialog is a special type of window. Its purpose is to inform you of something, or request input from you, or both. It provides controls for you to use to specify how to carry out an action. The technical names for common controls are shown in Figure 1. In most cases we do not use the technical terms in this book, but it is useful to know them because the Help and other sources of information often use them.
10 Base Handbook Figure 1: Dialog showing common controls
1) Tabbed page (not strictly speaking a control).
2) Radio buttons (only one can be selected at a time).
3) Checkbox (more than one can be selected at a time).
4) Spin box (click the up and down arrows to change the number shown in the text box next to it, or type in the text box).
5) Thumbnail or preview.
6) Drop-down list from which to select an item.
7) Push buttons.
In most cases, you can interact only with the dialog (not the document itself) as long as the dialog remains open. When you close the dialog after use (usually, clicking OK or another button saves your changes and closes the dialog), then you can again work with your document.
Some dialogs can be left open as you work, so you can switch back and forth between the dialog and your document. An example of this type is the Find & Replace dialog.
Who wrote this book?
This book was written by volunteers from the LibreOffice community. Profits from sales of the printed edition will be used to benefit the community.
May I distribute LibreOffice to anyone?
How many computers may I install it on?
As many as you like.
May I sell it?
May I use LibreOffice in my business?
Is LibreOffice available in my language?
LibreOffice has been translated (localized) into over 40 languages, so your language probably is supported. Additionally, there are over 70 spelling, hyphenation, and thesaurus dictionaries available for languages, and dialects that do not have a localized program interface. The dictionaries are available from the LibreOffice website at: www.libreoffice.org.
How can you make it for free?
LibreOffice is developed and maintained by volunteers and has the backing of several organizations.
I am writing a software application. May I use programming code from LibreOffice in my program?
You may, within the parameters set in the LGPL. Read the license:
http://www.libreoffice.org/download/license/ Why do I need Java to run LibreOffice? Is it written in Java?
LibreOffice is not written in Java; it is written in the C++ language. Java is one of several languages that can be used to extend the software. The Java JDK/JRE is only required for some features; the most notable one is the HSQLDB relational database engine.
How can I contribute to LibreOffice?
You can help with the development and user support of LibreOffice in many ways, and you do
not need to be a programmer. To start, check out this webpage:
http://www.documentfoundation.org/contribution/ May I distribute the PDF of this book, or print and sell copies?
Yes, as long as you meet the requirements of one of the licenses in the copyright statement at the beginning of this book. You do not have to request special permission. In addition, we request that you share with the project some of the profits you make from sales of books, in consideration of all the work we have put into producing them.