Advanced Database – Assign/attach a macro to a control

Another way to directly run a macro is to create a button in the form. In the main Base window, right click the form and click Edit to open it in design view. Select the ‘Push button’ icon from the controls toolbar. Click and drag in the form to draw a button. Right click on…

Read More

Advanced Database – Assign/attach a macro to a command button

Open the form and select Tools->Customize Select the ‘Standard’ Toolbar from the drop-down list. Click Add Command. At the bottom of the Category section, select LibreOffice Macros. Navigate to the ‘Newrecord’ macro we created. Click Add. Notice that there is now a button on the Standard form toolbar that says Newrecord. If you click on…

Read More

Advanced Database – Create a simple macro

First, make sure that macro recording is enabled. Open a Libreoffice Base database file. From the main window taskbar select Tools->Options then select LibreOffice->Advanced. Check the optional feature: Enable macro recording. Please note that macro recording is limited in LibreOffice Base due to program stability issues. In the current version of Base, macros can only…

Read More

Advanced Database – Import from existing database into a database.

Open two separate database files. To import data, you can simply drag and drop between the windows. For example, to copy the Names table from the lower database in the example shown, left click and hold on ‘Names’ in the Tables section and drag it to the Tables section of the other database. A dialogue…

Read More

Advanced Database – Link external data to a database: text

For this tutorial, we are going to create a text file in LibreOffice Writer. Open LibreOffice Writer. Enter the text shown. The first line designates field names, separated by commas. Each new line represents a new record with fields in the same order as the top line. Select Save As from the File menu. Name…

Read More

Advanced Database – Link external data to a database: spreadsheet

For this tutorial, first we are going to create a LibreOffice Calc spreadsheet. Open a new Calc file. In sheet 1, enter the data shown to the left. Then right click on the tab for the sheet and select ‘Rename Sheet’ Type Customer Names and Ages, click OK. Save the sheet as ‘Example 1’ Click…

Read More

Understanding Databases – Force page breaks for groups in a report

Select the Surname group section on the left hand side (in blue) In the properties section on the right hand side, where it says ‘Force New Page’ select ‘Before Section’. This will insert a page break before each new section. Execute the report to see the effect of this change. Notice that a page break…

Read More

Advanced Databases – Sort, group records in a report by field(s)

To change the sorting and grouping in a report, click the sorting and grouping icon. In the window that pops up, you can select the grouped fields and change their properties. You can choose to sort ascending or descending, as well as choose whether to display headers and footers. Execute the report with the settings…

Read More