Migrating from Lotus Approach to LibreOffice Base

March 10, 2013

I had a number of databases in Lotus Approach. Luckily, I’d had the foresight to make them dBASE databases, which LibreOffice knows a little about.

However, it doesn’t look as if LibreOffice knows much about Lotus Approach, which means all my existing forms were history. I started migrating them to LibreOffice forms. The form designer is a little rustic in LibreOffice (shift to multiselect on Windows, still can’t figure snap to grid out), but it’s enough to do what I need.

I used the automated form wizard to create forms from the fields first. That was enough to get started.

Next, I had a couple of fields that were combo boxes in Approach. To change the text field in LibreOffice Base to a combo box, I followed the instructions here:


In case that goes away, here’s the summary of what I did:

  1. Click on the text field that the wizard created
  2. Since that field is actually a group, pop up the context menu and say Group->Ungroup
  3. Click on the text field rather than the label
  4. Pop up the context menu and say Replace With->Combo Box
  5. Pop up the context menu and select “Control…” to open control properties
  6. All my combo boxes were populated from the database. To do that, choose the Data tab
  7. Change “Type of list contents” from “Table” to “Sql”
  8. For “List content”, enter SELECT DISTINCT “field” FROM “table” (e.g., SELECT “ARTIST” FROM “CD” for my CD database)
  9. Close the Properties dialog
  10. Re-group the field with its label

The same thing worked for dropdown lists – Replace With->List Box, change “Type of list contents” from “Valuelist” to “Sql” and use similar SQL to generate the list. I used “SELECT DISTINCT” rather than just “SELECT” because I didn’t want multiple copies showing up in my list box.

Creating headers in LibreOffice

February 20, 2013

Recently I had to create headers in LibreOffice. It’s not hard, but neither is it obvious. Here’s how I did it:

  1. Insert->Header->Default
  2. Format->Page->Header and unclick “Same page left/right”
  3. Edit the header to have all the text you want (sans fields)
  4. Insert the fields in the right places. I wanted Chapter and Page Number, so I did Insert->Fields->Page Number and Insert->Fields->Other->Chapter. I used tab to space them out. (In general, page number goes on the left for even pages and on the right for odd pages.)
  5. That was cool and all, but left me with a page number on page one, which I didn’t want. Luckily, I found this site which explained the magic. Go to the first page, then click Format->Styles and Formatting. Pick the fourth box (Page Styles) and double-click on “First Page”.

Done! Now I have headers that look like books or magazines.

Error 1303 upgrading LibreOffice 3.5.3 to 3.5.6

September 30, 2012

It looks like LibreOffice prompts you now when there’s an upgrade. I ran into a problem, though, when trying to upgrade on Windows 7.

When I tried the upgrade, I was told that I didn’t have enough permissions – even when I was running as administrator. I’d get an “error 1303: Installer has insufficient privileges to access C:\Program Files\…” and the install would always fail.

Even when I tried to take ownership of the files in that directory, I couldn’t. It was a puzzle. After a while messing about, I decided to nuke the whole thing from orbit. Finally that gave me a clue: when I tried to delete the files, some were left because a process was holding them open. (There were a couple of files – under share\config\soffice.cfg\modules\sglobal\toolbar) and whatever was running must have restarted at boot because it survived a reboot.)

That gave me the hints I needed. I booted into safe mode and deleted “C:\Program Files\LibreOffice 3.5” and its subdirectories. That worked, then I rebooted into normal mode and installed the 3.5.6 installer files. Now LibreOffice is upgraded and working again.