Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Extra Space in Labels?


This topic is 8349 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Our firm recently purchased FileMaker 5.5 and I am starting to layout some simple database files with it. The first one is a contact list that I need to use to produce mailing labels. Simple, right?

Everything is working just fine except for one small detail - the text on the first line of my addresses has an extra space. Below is how I have laid out the mailing labels...

<Title>space<First>space<Last>space<Suffix>

<Company>

<Street>

<City>,space<State>space<Zip>

For labels where the contact has a title everything prints just fine...

Mr. John Doe

Acme Corp.

123 45th Street

Wherever, KS 90123

But for labels where there is no title, there is an extra space (or two) in front of the first name...

John Doe

Acme Corp.

123 45th Street

Wherever, KS 90123

Now I was thinking that the extra space was due to the space I had laid out between the <Title> and <First> fields, even though I would expect that FM would know to delete that if there was no entry for the field preceding it. However, to test, I removed the space in the label layout and there was still a space in the printout, though not as large (which is why I susupect that there is actually two spaces in the original, and deleting the space in the layout only got rid of one of the extra spaces)...

John Doe

Acme Corp.

123 45th Street

Wherever, KS 90123

I suspected that maybe the font I was using was creating this problem, so I changed the font in the label layout to "Geneva" figuring that should be a safe default - the space still shows up as before.

Has anybody come across this problem and have a possible solution to this or reason for it? Any help would be greatly appreciated.

--

Aj

Posted

One approach would be to define a calculation field called, say, Label_Display:

code:


= If(Length(Trim(Substitute(Title, "
Posted

I'd agree with Bridge's using the calculations - especiallay if the data is old or has been maintained my many different people.

I created one with data that orignated from several databases and had many users over many years. There were all sorts of spaces, carriage returns, dots dashes and sorts of funk things thrown into the fields.

I solved mine with a calc field for each of the elements instead of one for the entire label, but either way could work. I was only concerned about having two adress lines and many of the second lines were empty, I wanted to use the sliding/printing option to eleiminate the second row when it was not used.

Believe me, the work will be worthwhile if you have at more than a few hundred addresses to fix manually!

Posted

Bridge & Bruce,

Thanks for the reply and information. As you assumed Bruce, the data has been entered by a several different people over the course of the last 3 years in an Outlook Address Book. Am I correct in understanding that the thought is that there are extra invisible characters in the text entered in the fields that is causing these extra spaces? If so, I would like to find a way to eliminate those characters instead of using the calculation field.

I tried the calculation field as you have posted it Bridge - I basically just copy/pasted it from the post into a text file and then from the text file into the calculation description in FM. The calculation did not work properly, and I feel that is probably because my inbetween step of pasting into a text file before the FM calculation description.

Sidenote: our office is primarily Wintel, but I have both a Wintel and a G4 on my desk - lucky me! - the Internet connection is thru the Wintel network and I do my work on the G4, so I have to pass info back and forth via files.

Another thing I'm concerned about with the calculation field is that I will not be able to format the text differently for the Names vs. the address. I realize that if I set up separate calc fields for the name and address (as Bruce suggested) I would be able to do this, but I would first like to find a simpler solution, if that's possible.

Thanks again for your replies and assistance, if either of you (or anyone else) thinks this could be solved by finding and deleting extra invisible characters in the fields, please let me know.

Thanks again.

--

Aj

Posted

I broke down and contacted FM Tech Support and here is what they suggested - the "Sliding Field Objects" solution...

Create the labels layout with the Layout Wizard for the appropriate Avery or Custom Labels then duplicate that layout and delete the merge data field object.

Modify the duplicated label layout by dragging "Field Objects" onto the layout. Select the Field Objects and setup "Slide Options" (under the "Format" menu) for the appropriate objects. Text Objects may also be necessary for things like commas.

You have to play with the position of the Field and Text Objects to get the correct layout, but the results are good once setup is complete.

There seem to be a number of advantages over the "Calculation Fields" solution...

1) Easy to understand: no calculation scripting, just drag boxes

2) Independent Field Formatting: each field can easily be formatted separately

3) Future Reference: looking back on the layout, it's easy to see how it was setup (for non FM pros ;-)

Bridge, after talking to FM Tech Support about the solution you offered, he pointed out that the reason it probably wasn't working for me was because I had neglected to switch the "Calculation result is..." as Text - he was right, I had it set to Number. After I made the modification it worked just fine. IMHO your "Calculation Fields" solution also has some advantages...

1) Quick to Implement: just create a calc field and paste the code (thanks to Bridge)

2) Easy to Adjust Size: just change the size of the Calculation Field

Thanks again Bridge and Bruce for your help. The only problem is, through all of this nobody could answer why the merge data fields did not print correctly (by adding extra spaces for empty fields). The suggestions offered for this were possible invisible characters, corrupt file, corrupt layout or non-generic printer drivers. However, I have tested each scenario with brand new files, layouts, personally entered data and generic printer drivers on both Mac and Wintel platforms and the results are always the same - spaces where there are empty fields. The mystery goes on...

--

Aj

[ January 22, 2002: Message edited by: Aj ]

Posted

Use the calcualtion field.

As for odd spaces: people often enter leading and trailing spaces, sometimes even new lines. The calculation posted above by the bridge should clear up all these evils.

The only other improvement is to put in some conditionals to stop blank lines and spaces from being inserted by the calculation for fields that might be left empty. For example:

code:


If (IsEmpty (Title), "", Trim(Substitute(Title, "
Posted

Thanks for the explanation. Since there is no comparison equation, I assume you are using the Length() function as a boolean operator: 0 is false, 1 or more is true.

Posted

quote:

Originally posted by Vaughan:

I assume you are using the Length() function as a boolean operator: 0 is false, 1 or more is true.

That's right, although I have since realized that IsEmpty(Trim(Substitute(Fieldname, "

Posted

Good discussion - over my head - but good info.

I laid out my labels using the "Sliding Fields Ojbects", which worked fine except for one thing - the labels do not print centered vertically.

Bridge's "Calculation Field" method DOES center things vertically, because being in just one field you have the option to set the vertical text alignment. However, I cannot find a way to adjust the formatting within that one field. It appears that one CAN adjust the formatting in Browse mode WITHIN text fields, but I have not found a way to do that with Calc fields.

As a workaround, I thought of maybe setting up two Calc fields, one for the name/company info and another for the street/city/state/zip info, since the street info is the one with variable lines. Unfortunately, this still does not center vertically, it aligns to the top based on the topmost field. In fact, it displays nearly identically to the way it the Sliding Field Objects method does.

So, I'm wondering two things...

1) Is there a way to get multiple text fields to center vertically as a group (NOT individually)?

-- OR --

2) Is there a way to format the text WITHIN a Calculation field?

Unfortunately, the ideal solution to the above problem is what started this post in the first place - Merge Fields that work properly! That would be by far the easiest and most flexible solution! I still am not satisfied with any explanation I've heard yet as to why the Merge Fields add spaces.

Vaughn, I see you have a similar theory to Bruce (or was it Bridge?); that there are extra leading or ending spaces in either the entered text or the Merge Fields themselves. To test the Extra leading/ending spaces theory, I created new files from scratch. I entered the text and created the Merge Fields myself - there are no extra spaces being introduced this way. If there were, then I would say that this process is totally whacked because I can't imagine another way of doing it.

I tested the printer driver theory by using FM on different systems with totally different printer drivers - the output was exactly the same on both.

I tested the corrupt file theory by creating brand new files, though there was absolutely no other sign of anything unusual in the original file I was working with.

This leads me to the only other possible conclusion I can draw - it's a FileMaker 5.5 BUG. To test THIS theory, has anyone or can anyone do the following in FM 5.5...

Create a file with the following fields...

Title

First Name

Middle Name

Last Name

Suffix

Company

Street

City

State

Zip

Enter two or three contacts, making sure that there is at least one contact with no title and one contact with no middle name/initial.

Create a new layout with the label wizard, use Avery 5660 for the label layout and drop the fields into the label contents like so...

<<Title>>space<<First Name>>space<<Middle Name>>space<<Last Name>>space<<Suffix>>return

<<Company>>return

<<Street>>return

<<City>>space<<State>>space<<Zip>>

I would love to hear if anyone can produce a Merge Field layout where there are no extra spaces added for the contact with no Title and the contact with no middle name/initial.

I hope somebody can prove me wrong or else I think it's time to report a bug.

--

Aj

[ January 24, 2002: Message edited by: Aj ]

Posted

You're all going to hate yourself:

Create a calc field that combines all the relevant data, adding (or removing) spaces, paragraph marks, etc., as necessary. Use this calc field in the label.

I like simple solutions, I do.

Dan

Posted

quote:

Originally posted by danjacoby:

You're all going to hate yourself:

Create a calc field that combines all the relevant data, adding (or removing) spaces, paragraph marks, etc., as necessary. Use this calc field in the label.

I like simple solutions, I do.

Dan

Good idea, Dan -- I wish I'd suggested that. wink.gif" border="0

Aj: The spaces between your merges will display/print whether there is a valid value in the preceding merge field or not. The answer here is to use or modify the calc given above. You don't have to cram every field in there. It's a little extra work, but you can create a separate calculated display field for each field that you want to display. Each calculation field would take the form of:

code:


If(IsEmpty(Trim(Substitute(Field, "

This topic is 8349 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.