Difference between revisions of "Documentation/SL/How Tos/Prikrivanje praznih polj Naslov2 v spojenih dokumentih"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{Documentation/CheckedAccuracy SL|mwaller july08}}
 
{{Documentation/CheckedAccuracy SL|mwaller july08}}
 
{{DISPLAYTITLE:Prikrivanje praznih polj Naslov2 v spojenih dokumentih}}
 
{{DISPLAYTITLE:Prikrivanje praznih polj Naslov2 v spojenih dokumentih}}
Here is the situation we are addressing. Sometimes your addresses have two lines for the address part, sometimes they do not.
+
Tule je primer težave, ki jo želimo rešiti. Nekateri naslovi imajo dve vrstici naslova, drugi pa tri.
  
 
{|  
 
{|  
|width="150"|'''Bob Jones'''
+
|width="150"|'''Janez Primer'''
|'''Marion Silverman'''
+
|'''Marija Primer'''
 
|-
 
|-
|'''101 Main'''
+
|'''Glavna ulica 101'''
|'''888 105th Ave'''
+
|'''Stranska ulica 102'''
 
|-
 
|-
|'''Suite 55'''
+
|'''Soba 55'''
|'''Broomfield, CO 82211'''
+
|'''1111 Spodnji Kraj'''
 
|-
 
|-
|'''Boulder, CO 80022'''
+
|'''2222 Zgornji Kraj'''
 
|}
 
|}
  
  
  
But you have to put in the <Address2> field for everybody, since it is a mail merge. The setup has to be the same.
+
Ker pa gre za spajanje dokumentov, morate za vsakega prejemnika vnesti polje <Naslov2>. The setup has to be the same.
  
 
'''<Firstname> <Lastname>''' <br>
 
'''<Firstname> <Lastname>''' <br>

Revision as of 14:37, 10 March 2009


Tule je primer težave, ki jo želimo rešiti. Nekateri naslovi imajo dve vrstici naslova, drugi pa tri.

Janez Primer Marija Primer
Glavna ulica 101 Stranska ulica 102
Soba 55 1111 Spodnji Kraj
2222 Zgornji Kraj


Ker pa gre za spajanje dokumentov, morate za vsakega prejemnika vnesti polje <Naslov2>. The setup has to be the same.

<Firstname> <Lastname>
<Address1>
<Address2>
<City>, <State>, <Zip>


But with this approach, your addresses look like this.

Bob Jones Marion Silverman
101 Main 888 105th Ave
Suite 55
Boulder, CO 80022 Broomfield, CO 82211


How do you suppress that second Address2 line and the corresponding carriage return if there is no content for a particular record, for that Addres2 field?

Here is the guide, using an example of labels.

1. Create the labels for mail merge as usual. File > New > Labels, select your database and tables, insert the fields, etc.(See Creating Mail Merge Documents From Text/CSV or Spreadsheets)

2. Choose the Synchronize Contents checkbox.

3. Click New Document. The labels will appear.

4. Turn on nonprinting characters if they are not on already, by choosing View > Nonprinting Characters.

5. Select the first soft return, shown selected.
Label with soft returns

6. Press Return or Enter to replace it with a hard return.

7. Repeat, to make them all hard returns.

8. Click Synchronize Labels to update the other labels to be the same.

9. Select the Address2 field.

10. Choose Insert > Section.

11. Name the new section Suppress. Select the Hide checkbox and type the following condition.

  databasename.tablename.fieldname EQ ""    

The names are case sensitive and the last part is two double quotes together.


Example:

databasename = DatabaseWithTwoAddresslines

tablename = Table1

fieldname = Address2

Template:Documentation/Note

12. Click Insert.

13. Click Synchronize Labels.

14. Now preview the data or print the data.

If you need to change the section, select it in the first address and choose Format > Section. Select the one named Suppress for the master label and make changes, then click OK. Click Synchronize labels again.

Template:Documentation/Tip


This How To comes from Solveig Haugland's Blog

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools