How Best To Format Address Field(s)

Creating and using forms
Post Reply
JEJeffrey
Posts: 2
Joined: Sun Feb 23, 2014 2:12 pm

How Best To Format Address Field(s)

Post by JEJeffrey »

Base 5.0.4.2, Windows 10. I have a table of Names & Addresses which I imported to Base from a spreadsheet. In the spreadsheet, multi-line addresses were stored in a single cell for each record, with line feeds included.
To the naked eye (!), the table looks very similar to the original spreadsheet, but the formatting of the address field has disappeared. When I construct a Form to display a single record, the address appears as a single string, with no 'line feeds'. I have tried formatting the address field as text/ multi line, but this does not re-introduce the missing line feeds. I can alter each record manually (fewer than 300, so feasible albeit unwelcome), but is there an alternative approach?
I am keen to keep to a single field for 'address' rather than having 'Address Line 1, address line 2' etc, so as to simplify suppression of blank fields when printing labels.
Windows 7, Libre Office 4.1.4.2
F3K Total
Volunteer
Posts: 1039
Joined: Fri Dec 16, 2011 8:20 pm

Re: How Best To Format Address Field(s)

Post by F3K Total »

IMPOV: Wrong approach!
I suggest to use search and replace with regular expressions to replace \n by ; (newline by e.g. semicolon) and then Text to Columns....
Now you have , as you didn't wanted, 'Address Line 1, address line 2' etc in several columns.
Imported to base, you can later on use dependent hidden text or hidden paragraph functions (CTRL+F2/Tab Functions) in Writer, to stear the appearance of the labels.
R
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
User avatar
Villeroy
Volunteer
Posts: 31283
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How Best To Format Address Field(s)

Post by Villeroy »

Multi-line text works for me in every way I can think of:
-- input forms with multi-line text boxes
-- mail merge fields in Writer documents
-- old style reports without Oracle Report Builder extension
-- reports produced by the Oracle Report Builder extension (adjust field heights)
-- database ranges in spreadsheets linked to multi-line cells of other spreadsheets (adjust cell heights)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
JEJeffrey
Posts: 2
Joined: Sun Feb 23, 2014 2:12 pm

Re: How Best To Format Address Field(s)

Post by JEJeffrey »

Very kind of you to take time on Christmas Day to suggest a way ahead. I will certainly study your advice. Thanks
Windows 7, Libre Office 4.1.4.2
Post Reply