gCECo‖Report Builder

Contents
8WDCS‖

# DouuB‖Report Builder

tcUx2‖The Report Builder is a tool to create your own database reports. Unlike with the Report Wizard, using the Report Builder you can take control to design the report the way you want. The generated report is a Writer document that you can edit, too.

kCCcM‖To use the Report Builder, the Java Runtime Environment (JRE) software must be installed, and this software must be selected in LibreOffice.

## MUFG8‖To install the JRE software

CTy58‖The Report Builder requires an installed Java Runtime Environment (JRE).

1. t42Ud‖Choose LibreOffice - PreferencesTools - Options - LibreOffice - Advanced.

2. bGABC‖Wait up to one minute, while LibreOffice collects information on installed Java software on your system.

   oxLT3‖If a recent JRE version is found on your system, you see an entry in the list.

3. 87xW7‖Click the option button in front of the entry to enable this JRE version for use in LibreOffice.

4. KmqC6‖Ensure that Use a Java runtime environment is enabled.

oeX8D‖If no JRE version is found on your system, open your web browser and download the JRE software from http://www.java.com. Install the JRE software. Then restart LibreOffice and open LibreOffice - PreferencesTools - Options - LibreOffice - Advanced again.

## 87hJD‖To open the Report Builder

1. TxLZj‖Open a Base file or create a new database. The database must contain at least one table with at least one data field and a primary key field.

2. NiuEf‖Click the Reports icon in the Base window, then choose Create Report in Design View.

   aCEqr‖The Report Builder window opens.

eC7Ku‖The Report Builder is divided into three parts. On the top you see the menu, with the toolbars below.

FZucS‖On the right you see the Properties window with the property values of the currently selected object.

9iUTs‖The left part of the Report Builder window shows the Report Builder view. The Report Builder view is initially divided into three sections, from top to bottom:

1. pBQwZ‖ Page Header - drag control fields with fixed text into the Page Header area

2. WAcdm‖ Detail - drag and drop database fields into the Detail area

3. JqEFC‖ Page Footer - drag control fields with fixed text into the Page Footer area

GbMdT‖To insert an additional Report Header and Report Footer area choose Edit - Insert Report Header/Footer. These areas contain text that appears at the start and end of the whole report.

cvEuz‖Click the "-" icon in front of an area name to collapse that area to one line in the Report Builder view. The "-" icon changes to a "+" icon, and you can click this to expand the area again.

NCMdn‖You insert database fields by drag-and-drop into the Detail area. See the section "To insert fields into the report" below.

3dx6B‖In addition, you can click the Label Field or Text Box icon in the toolbar, then drag a rectangle in the Page Header or Page Footer area, to define a text that is the same on all pages. You enter the text in the Label box of the corresponding Properties window. You can also add graphics by using the Graphics icon.

## 25GDr‖To connect the report to a database table

1. TuFVF‖Move the mouse to the Properties view. You see two tab pages General and Data.

2. WdBn9‖On the Data tab page, click Content to open the combo box.

3. UKbEt‖Select the table for that you want to create the report.

4. NzJzg‖After selecting the table, press the Tab key to leave the Content box.

vw4gh‖The Add fields to report window opens automatically and shows all fields of the selected table.

## Z4goc‖Add fields to report

zFCzB‖The Add Field window helps you to insert the table entries in the report.

vsFKB‖

BqG3G‖

UcCYH‖

gDxeY‖

nNfGG‖

GuD9F‖

NAFEu‖

ssdFE‖

yLQm4‖

XVFTm‖

5gYXB‖

K9bij‖

S4vSt‖

bFTYS‖After inserting fields in the Detail view, the report is ready for execution.

## j9t2k‖To execute a report

FtAeF‖Click the Execute Report icon on the toolbar.

4GTQe‖

FRApC‖Execute Report icon

EbwoS‖A Writer document opens and shows the report you have created, which contains all values of the database table which you have insert.

CCUrN‖If the database contents did change, execute the report again to update the result report.

## XrBwB‖To edit a report

GinFd‖First decide if you want to edit the generated report, which is a static Writer document, or if you want to edit the Report Builder view and then generate a new report based on the new design.

awMUn‖The Writer document is opened read-only. To edit the Writer document, click Edit Document on the information bar, or choose Edit - Edit Mode.

G2dAA‖If you want to edit the Report Builder view, you can change some of its properties.

XYvED‖Click in the Details area. Then in the Properties window, change some properties, for example the background color.

YbHaF‖After finishing, click the Execute Report icon to create a new report.

4GTQe‖

FRApC‖Execute Report icon

h2c39‖If you close the Report Builder, you will be asked if the report should be saved. Click Yes, give the report a name, and click OK.

## T8vuS‖Sorting the report

Cg7RE‖Without sorting or grouping, the records will be inserted into the report in the order in which they are retrieved from the database.

1. ZgBCK‖Open the Report Builder view and click the Sorting and Grouping icon on the toolbar. You see the Sorting and Grouping dialog.

939GY‖

EcCrC‖Icon Sort and Grouping

2. 35NvQ‖In the Groups box, click the field which you want as the first sort field, and set the Sorting property.

3. heWc5‖Execute the report.

## FoAAB‖Grouping

1. gBGNE‖Open the Report Builder view and click the Sorting and Grouping icon on the toolbar. You see the Sorting and Grouping dialog.

2. zfuDw‖In the Groups box, open the Group Header list box and select to show a group header.

3. 6BQtB‖Click the Add Field icon to open the Add Field window.

3c7Xd‖

CKwKa‖Icon Add Field

4. WyQ6C‖Drag-and-drop the field entry that you want to group into the group header section. Then drag-and-drop the remaining fields into the Detail section.

5. GscG2‖Execute the report. The report shows the grouped records.

dLiAY‖If you like to sort and group, open the Report Builder view, then open the Sorting and Grouping dialog. Select to show a Group Header for the fields that you want to group, and select to hide the Group Header for the fields that you want to be sorted. Close the Sorting and Grouping window and execute the report.

## WGFAC‖Updating and printing your data

9CfYU‖When you insert some new data or edit data in the table, a new report will show the updated data.

WBEpS‖Click the Reports icon and double-click your last saved report. A new Writer document will be created which shows the new data.

Eoy3q‖

DseWN‖Icon Reports

Kp54P‖To print a report, choose File - Print from the Writer document.

Please support us!