More mailmerge woes

Ok, just in case you didn't see it before, I want to print address
labels from my (magazine) subscriber database.

The page is very simple. I want to print an address block, with no
blank lines. I want to print either a second class stamp, or a first
class stamp with the words "AIR MAIL".

After help from this group almost all of it works.

The problem I'm having is that the person's name is the only line
that is printed with the contents of the fields! All the other
address fields just print with the field name! It's the correct
fieldname, and they appear or disappear correctly depending on
whether they have text in them or not, but I don't want the field
names, I want the contents!

So, instead of printing (for example)

    Mr Fred Bloggs
    MadeUp Company PLC
    London

it's printing

    Mr Fred Bloggs
    <Company>
    <City>

It's very strange. I can't see any difference between the first line
and the others, but when I look at the field properties by double
clicking on it, the field shows correctly whereas the others only the
table (in actual fact a query) is highlighted. I can select the
correct field, but if I close the properties window and go back to
it, the table is shown again. But hovering over the field in design
mode shows the correct fieldname, and the correct fieldname is
(incorrectly) displayed instead of its contents!

Any ideas?

Regards
Mark Stanton

1) Did you try to edit the field properties and change its source by editing
it manually instead of clicking? (If I remember correctly, there has been a
similar bug in OOo middle age, that db fields entered by drag&drop from the db
browser did not work after saving the file and opening it again. They had to
be edited manually to stay permanent).

2) are there any special characters in table/query names?

3) Maybe, fields from queries cause problems while table fields do not?

(just some ideas from earlier work, I have no actual experience)

BTW, which LibO version do you use? On what platform?

Nino

Hi Mark,

The problem I'm having is that the person's name is the only line
that is printed with the contents of the fields! All the other
address fields just print with the field name! It's the correct
fieldname, and they appear or disappear correctly depending on
whether they have text in them or not, but I don't want the field
names, I want the contents!

Sounds like a bug to me, or else a problem with a conditional paragraph
setting. Do the paragraphs with the problem (i.e. those that show the
Field Reference and not the content) have an associated conditional
paragraph setting ?

Methinks also of the bug that affected activation of non-printable
characters (paragraph returns etc), which was a result of a bug which,
when exporting to PDF, caused the configuration setting to be
deactivated (XML property within the user's confguration). I don't know
whether this was actually fixed or not.

Alex

Mark Stanton wrote (16-03-12 14:19)

The problem I'm having is that the person's name is the only line
that is printed with the contents of the fields! All the other

The wizard places new lines (Sht-Enter) after each field, so effectively more of your fields are in the line with the condition.
Editing the label manually and use Enter will help :slight_smile:

Cheers,

Thanks for all of this.

The only wizard I've used on this is the mailmerge wizard, which I
can't avoid (can I?) Is that the only "manual", or is there a way to
edit the file more manually than that, presumably not through Writer.
Is it just xml?

Yes, every line has a conditional paragraph field at the beginning of
it. A couple of them probably don't need it, every address label
will almost ceratinly have some kind of person's name for example,
but I put it there anyway. They seem to be in the right place
(before the database field) and contain the right conditions. I
could see them when I turned on "view field names", and that let me
look at their properties more easily.

These problems show up without an expert to pdf, I see them just at
the "Edit document" stage of the mailmerge wizard, although I also
went to the next stage, and they do appear there too.

Mark Stanton
One small step for mankind...

And to cover the other points not in my reply below, no there are no
special characters in the field names.

I'm not certain if fields from queries could be the cause, but it
seems unlikely since the first line works.

Great ideas, thanks!
Mark Stanton
One small step for mankind...

Yes, you can :wink:

The File / Print menu will ask if you want to print a mail merge. Just say yes then enjoy the olde OOo v1 wizard.

The File / Print menu will ask if you want to print a mail merge. Just
say yes then enjoy the olde OOo v1 wizard.

So it does! That's cute.

Unfortunately it only lists tables as data sources, and mine is a query
:frowning:

Mark Stanton
One small step for mankind...

Am 17.03.2012 11:15, Mark Stanton wrote:

The File / Print menu will ask if you want to print a mail merge. Just
say yes then enjoy the olde OOo v1 wizard.

So it does! That's cute.

Unfortunately it only lists tables as data sources, and mine is a query
:frowning:

Mark Stanton
One small step for mankind...

I suspect that you have lots of database documents connected to the same data source because you used the mail merge wizard several times for the same job.
Have a look at the database registration which exact .odb is registered as your data source. Open that file and look if it contains the query.
If not, find the right .odb file, point the registration to that one.
This is how you quickly rebuild the your merge fields:
Open the letter, hit F4, point to the query, wait a moment and drag the right column headers next to the existing fields and remove the older ones.

Herr Säger, you may have hit the nail on the head, thank you.

Yes, even though my query was correctly displayed as the driving data
for the document (of course, since I'm using mailmerge, this is a
Writer document that has the problem), when I went through the
"Change datasource" dialogue/wizard, it showed a different database
as the source, weird!

And that is a *fabulous* feature in Writer, just dragging the column
onto the page, fabulous.

However, there was still one problem remaining which I have fixed by
changing the field name "Company" to "Co".
Whether I allowed MySQL to produce the fieldname or explicitly
speciifed it with an alias, Base would insert the field as "company"
(lowercase first letter), and it would therefore display the
fieldname not the field contents, because the query wasn't producing
a field with that name! "Company" is a reserved word somehow?
Surely not!

Many thanx
Mark Stanton
One small step for mankind...