Chapter 12: Forms and Reports Notes

1. Introduction & Core Concepts

  • Database Objects: Both Forms and Reports are key database objects located in the Database Pane of the LibreOffice Base interface.
  • Purpose of Forms: Provide a user-friendly interface for data entry and modification to prevent accidental or intentional damage to underlying tables, serving as the front-end interface.
  • Purpose of Reports: Present data retrieved from tables or queries in a formatted, customized, and understandable presentation layout rather than standard row-and-column datasheet view.

2. Forms in LibreOffice Base

Structure of a Form

  • Field Controls: The primary component of a form, consisting of two parts:
    • Label: Text specifying what data should be entered.
    • Field Value Text Box: Linked directly to the corresponding database field.
  • Additional Elements: Form designs can also include titles, headers, logos, list boxes, radio buttons, and action controls.

Methods of Creating Forms

  1. Using a Wizard (simplest and guided method).
  2. Using Design View (manual layout and customization using tools).

Steps in the Form Wizard

  1. Field Selection: Choose the base table/query and move desired fields from Available Fields to Fields in the Form.
  2. Set up a Subform: (Optional) Add a nested form within a form.
  3. Control Layout: Choose control alignment (e.g., left, right) and select from four layout styles:
    • Columnar display with labels on the left.
    • Columnar display with labels on top.
    • Display as datasheet.
    • Block display with labels on top.
  4. Data Entry Mode: Set whether the form will display data, enter data, or perform both operations.
  5. Apply Styles: Customize background colors and border styles for text boxes (3D look by default, Flat, or No Border).
  6. Set Name: Assign a form name (e.g., EventsForm) and choose whether to open the form for work or edit it immediately.

Form Modification & Customization

  • Changing Background Color: Right-click form $\rightarrow$ Page Style… $\rightarrow$ Area tab $\rightarrow$ select color $\rightarrow$ OK.
  • Selecting Controls:
    • Click to select the control group (label + text box).
    • Press Ctrl + Click to select only the label or text box independently.
  • Editing Labels: Ctrl + Click on label $\rightarrow$ right-click $\rightarrow$ Control Properties… $\rightarrow$ modify Label text, font style, size, width, or height.
  • Adding a Tooltip (Help Text): Ctrl + Click on field text box $\rightarrow$ right-click $\rightarrow$ Control Properties… $\rightarrow$ scroll to Help Text property $\rightarrow$ enter hint text.
  • Adding a Calendar Dropdown: Ctrl + Click on date field text box $\rightarrow$ Control Properties… $\rightarrow$ change Date Format to Standard (long) $\rightarrow$ set DropDown to Yes.
  • Adding Custom Titles/Text: Click Label tool ($\text{A}$) on Form Controls toolbar $\rightarrow$ drag on form $\rightarrow$ edit caption via Properties: Label Field.

Toolbars

  • Form Controls Toolbar: Used to add, modify, and manage controls on the form. Includes the Design Mode toggle button to switch between Design View and Form View.
  • Records Toolbar: Located at the bottom; contains buttons for record navigation, adding a new record, saving, and deleting records.

3. Reports in LibreOffice Base

Overview

  • Functionality: Generates formatted printable documents based on tables, queries, or both.
  • Recommended Practice: For multi-table reports, create a query first and use that query as the data source for the report.

Steps in the Report Wizard (6 Steps)

  1. Field Selection: Choose the base table/query and select fields to include in the report.
  2. Labeling Fields: Change short database field names to clearer column header labels.
  3. Grouping: Group records based on specific field values (e.g., grouping events by CategoryID).
  4. Sort Options: Define primary and secondary field sorting in Ascending or Descending order.
  5. Choose Layout: Select data layout (e.g., Tabular), header/footer styles, and page orientation (Landscape or Portrait).
  6. Create Report: Specify the report title and choose the report type:
    • Dynamic Report: Automatically updates output whenever underlying table/query data changes.
    • Static Report: Preserves a fixed snapshot of data at the time of creation.

Modifying Reports (Report Builder Window)

  • When editing a report, the Report Builder window and Add Field dialog box open.
  • Inserting Report Titles: Select Label tool on Report Controls toolbar $\rightarrow$ drag text box in header $\rightarrow$ modify Label caption and font properties.
  • Inserting Date & Time: Click on Page Header $\rightarrow$ select Insert $\rightarrow$ Date and Time… from the menu bar $\rightarrow$ choose format.

4. Summary Quick Reference

FeatureFormReport
Primary UseInteractive data entry, editing, and viewingPresenting and summarizing retrieved data
Data FlowTwo-way (Input & Output)One-way (Output only)
Data SourceBase Table(s)Tables, Queries, or both
Creation MethodsWizard, Design ViewWizard, Report Builder
Dynamic UpdatesDirect real-time database modificationsCan be Dynamic (auto-updating) or Static

5. Check Your Progress — Answer Key

A. Multiple Choice Questions

  1. (b) Forms Controls Toolbar
  2. (a, c) First record, last record
  3. (b) It can contain only text fields (False statement)
  4. (c) Ctrl
  5. (b) Help Text
  6. (c) Report
  7. (b) Standard (long) (Requires DropDown set to Yes)
  8. (a) Design Mode
  9. (c) Both a and b
  10. (c) Both (a) and (b)

B. True or False

  1. False — Both forms and reports are database objects.
  2. True — Form layouts can be selected in step 5 of the wizard.
  3. False — Selected or all fields can be added to a form.
  4. True — Via Wizard or Design View.
  5. True — Opens in its own window.
  6. False — Controls can be repositioned and moved anytime.
  7. True — Records toolbar includes the New Record button.
  8. False — Reports can be generated from tables, queries, or both.
  9. False — Default sorting option is Ascending.
  10. True — Reports support grouping by specific fields.
  11. False — Reports can contain custom layouts, headers, titles, dates, and dynamic groupings.
  12. True — Date and time can be inserted into the header area.
  13. False — Reports can be edited in Report Builder view.

C. Fill in the Blanks

  1. Entering data, displaying data
  2. Label, field value text box
  3. Label
  4. 3D look
  5. Tool-tip (or Help text)
  6. Landscape
  7. Layout
  8. Insert
  9. 6
  10. Dynamic

D. Short Answer Questions

  1. Difference between Form and Report: A form is an interactive front-end interface used to input, modify, and view data, whereas a report is a formatted output object used to summarize and present retrieved data for viewing or printing.
  2. Field Control: A field control is a form visual element consisting of a label (specifying expected input) and a field value text box (linked to the database table field).
  3. Tool to insert text: The Label tool ($\text{A}$) on the Form Controls toolbar.
  4. Two ways to create a form: Using a Wizard, and using Design View.
  5. Static vs. Dynamic Report: A dynamic report updates automatically when base table/query data changes, whereas a static report keeps a fixed snapshot of data at the time of creation.
  6. Toolbar Functions:
    • Forms Controls Toolbar: Contains tools for adding, editing, and managing form controls, and toggles design/form mode.
    • Records Toolbar: Provides navigation control buttons to traverse records, add new records, save records, and delete records.
Scroll to Top