Computer Act!ve - UK (2022-05-11)

(Maropa) #1
37

We’ve sorted the results so they appear in order of star rating


Catalogue items in LibreOffice Base


Next issue: Add wireless charging to a phone


you want to add another record, click the
green play arrow and repeat the process.
You can use Forms to both show and
edit data, so use the arrow buttons on
the bottom bar^2 to move backwards and
forwards through your records, or type a
number in the ‘Record’ box^3 to jump to
a specific record in the database.
When you’ve finished entering half
a dozen records, close the form, then
click Tables in the sidebar, and double-
click your DVD-Collection table. You’ll
see that as your records were added to
the database, they were given a unique
number in the ID field, starting with zero,
even though you didn’t include this field
in your form.


5


Query your database
Close the table and click Queries
in the sidebar, followed by ‘Use
Wizard to Create Query...’. Although
you could query all the fields in your
database, we’re going to show you how
you can find the best films of a certain
length, for which you only need the
FilmTitle, Length and Stars fields. Press
Ctrl while clicking these, then click the >
button to add them to the ‘Fields in this
Query’ box. Click Next.
You now need to specify how the
results should be ranked. You don’t
want to waste time watching films you
don’t like, so click the first dropdown
menu (below ‘Sort by’) and select ‘DVD-
Collection.Stars’ (^1 in our screenshot
below). Click the button beside
Descending^2 so that films with higher
star ratings appear at the top of the list.
Click the menu beneath ‘Then by’ and
pick ‘DVD-Collection.Length’^3 , and click
Ascending beside it^4 , so where two films
have identical ratings, the shorter one is
listed first. Click Next.


Leave ‘Match all of the following’
selected on the next page and, on the
first row, select ‘DVD-Collection.Length’
from the Fields menu, and ‘is equal or
less than’ from the Condition menu. Now
type 100 in the Value box. In effect, we’re
asking Base to isolate films of an hour
and 40 minutes (100 minutes total) or less.
Click ‘Next’ three times, followed by
Finish. Base will display a list of films that
match your criteria, with your favourites
at the top of the pile.
If the results list is empty, your database
doesn’t contain any records that meet
the query’s requirements. Either add
more records, or right-click the query
in the Queries pane and pick Edit. This
opens a table view of the query, in which
the Criterion row of the Length column
contains ‘<= ‘100’’. Double-click this and
change 100 to a higher number, then
press Ctrl+W to close the screen. Click
‘Yes’ when asked if you want to save your
changes, then double-click the query
again to run it (rather than edit it) and
view the updated results.

6


Design a report
To produce a hard copy of
every record in your database,
click Reports, followed by ‘Use Wizard
to Create Report...’. By default, Base
wants to base the report on your query.
Click the dropdown menu below ‘Tables
or queries’ and select ‘Table:DVD-
Collection’. Now press Ctrl while clicking
FilmTitle, Length, Genre and Stars. Click
the > button to send them to the ‘Fields in
report’ box, then click Next.
One of these labels – FilmTitle – is not
ideal, so use the Label box on the next
screen to change it to Film Title. Click
Next twice. To list films alphabetically,
rather than by star rating, click the menu
beneath ‘Sort by’ and pick FilmTitle, then
click Next. The next screen asks how you
want the report laid out. Click ‘In blocks,
labels above’ (see screenshot below),
then click Next, followed by Finish. Base
will compile your report and open it in
LibreOffice Writer to be saved or printed.
To update it, double-click DVD-Collection
on Base’s Reports screen to regenerate it.

When we’d finished creating our
database, Base asked us to ‘install
a JRE and restart LibreOffice’ (see
screenshot). JRE stands for Java Runtime
Environment, and is a set of software
tools that LibreOffice needs to perform
some tasks. If you also see this message,
download JRE for free from http://www.
snipca.com/41631. Click ‘Windows
Offline (64-bit)’ and, when it’s finished
downloading, return to Base and click OK
on the warning box to clear it. Quit Base.
Launch the Java installer and follow the

instructions, accepting each of the default
options. When it has finished installing,
close the installer and launch Base again.
On the Database Wizard that appears,
click ‘Open an existing database file’.
Your ‘media’ database should already be
selected in the ‘Recently used’ menu but,
if not, click Open, then open it from your
Documents folder. Click Finish.

INSTALL JAVA RUNTIME ENVIRONMENT


Select ‘In blocks, labels above’ and Base will compile your report and open
it in LibreOffice Writer

(^12)
3
4
Issue 631 • 11 – 24 May 2022

Free download pdf