Forum at OOoForum.orgThe Forum
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Mailing Lables - Suppressing Empty Fields

Post new topic   Reply to topic Forum Index -> Writer
View previous topic :: View next topic  
Author Message

Joined: 30 May 2008
Posts: 4

PostPosted: Fri May 30, 2008 12:56 am    Post subject: Mailing Lables - Suppressing Empty Fields Reply with quote

I have recently attempted to create some mailing labels using openoffice writer and openoffice base to store the data.

The labels were quite straight forward to create. The problem I have is suppressing the empty fields if a line of an address doesn't exist for one entry but does for another.

I have followed loads of different tutorials to achieve this however it still doesn't work.

I can't believe that openoffice doesn't realise that there are empty spaces and automatically suppresses them!

Is this not a feature that should be available to a fairly low skilled office employee?
Back to top
View user's profile Send private message
OOo Advocate
OOo Advocate

Joined: 12 Aug 2004
Posts: 235
Location: Germany

PostPosted: Thu Jun 12, 2008 12:07 pm    Post subject: Reply with quote


You have insert the fields as conditional fields. You then specify a condition that will control wheather the field will be inserted or not. Lets assume:

You have a database that holds per entry
1. name
2. middle name
3. last name

Lets assume as well that you have only two entries
1. entry one with a middle name
2. entry two without a middle name

Lets assume you wnat to use them fields in three rows

middle name
last name

So you create a doc, press F4 to bring up your database panel and chose the databse you want to use. Drag the fields, here name middle name and last name in the document. So the second field is the one that either generates an entry in that particular line (for entry one) or will result in a blank line (entry two).

- Set the cursor in fron of the entry <middlename>
- Choose insert >field >other go to tab Functions and choose the last entry in the left panel "hidden paragraph".
- in the right upper field you will have to construct your conditions. I never got it why there is no gui to do so, but here isn't and you will have to do it the hard way:


database_name.Tablename.Fieldname EQ ""

So for database test with table Table1 and field middlename this would become
test.Table1.middlename EQ ""

so this will be read as if field middlename in Table1 of datase test is empty (aka there is no middle name specified in the field) the paragraph will be hidden.

So if you now print the doc you will not have an empty line in the document for the entry two.

Works in a small test setting for me.

Cheers Juergen

PS: I have to admi that the road to success is rather cumbersome. But if you have it figured out it is not that bad. It teaches you one thing though. Use simple names for database and database fields and avoid spaces in them name at all costs. Any of those will make the condition construction really painfull...
Back to top
View user's profile Send private message Visit poster's website

Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Thu Jun 12, 2008 2:23 pm    Post subject: Reply with quote

If you create your labels by inserting the fields at the Wizard's Labels tab then you want to make sure you check Synchronize on the Options tab. After New Doc turn on View > Nonprinting Characters and note that you have line breaks after each line but the last. You need to change these to paragraph breaks in the upper left label so the Hidden Paragraph field affects only the one line.

After setting up the field (the Condition actually doesn't require the DB name - Fieldname EQ "" is sufficient) click the Synchronize button to pass the changes to all other labels.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> Writer All times are GMT - 8 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group