| View previous topic :: View next topic |
| Author |
Message |
lepley_a General User

Joined: 29 Nov 2004 Posts: 20
|
Posted: Mon Apr 03, 2006 12:39 pm Post subject: mail-merge of sorted base file |
|
|
When doing a "mail-"merge of a base file where the records have been sorted on a field, the resulting merged document always has the original record creation order not the sort order. This is independent of whether the file has been rebuilt in the new sort order. With most databases a rebuild creates a new file with the records in the current sort order. Subsequent use of the rebuilt file results in data in the last sort order. However when I try to create a document with a rebuild base file it always has the original record entry order. How do I get out the data in the sort order rather than the original data entry order? I am trying to merge into a single document set up with repeated use of fields so that each access of the field is with the next record in the file. What does "rebuild" mean in OOo base? I guess I just don't understand how to use base! All I am trying to do is get a list of a few fields for the entire database but I want the document list created and subsequently printed to be in sort order. _________________ Everything nice, Art |
|
| Back to top |
|
 |
Aristo Newbie

Joined: 26 Jun 2007 Posts: 4
|
Posted: Mon Nov 12, 2007 6:45 am Post subject: |
|
|
I have about the same problem.
I've a writer document with mail merge fields (insert, fields, other, database, mail merge fields) and next record (insert, fields, other, database, next record) in it. So it looks like this:
<name>
<adress>
<state>
<next record>
<name>
<adress>
<state>
<next record>
etc.
I've made this in such a way, that when inserting records, exactly two pages are filled.
The mail merge fields in the writer document refer to a database registered in OO. Before doing the mail merge, I openend the database, sorted the records by a field (e.g. name), then saved the database. The way the records are now ordered, is not the order in which they were created. (lepley_a calls the order in which the records were created the original order)
Now I run a mail merge using the mail merge wizard (tools, mail merge). Everything goes fine and I get one document containing all 150 records. However, the records are in their original order. Sorting the records in the database by a certain field before running the mail merge, has not had any effect. I can't find out where in the mail merge wizard I can select by which field the records must be sorted. There seems to be no such option in the mail merge wizard.
I tried the other OO mail merge. (yes, OO has two mail merge functions). When printing the writer document (file, print), OO asks wether I want the print a form letter. I click yes. I set the output to file, then run the mail merge.
OO now creates great many diffirent documents, each having only two pages. (Recall that I made the lay out in such a way, that when inserting records, exactly two pages are filled. The mail merge wizard (tools, mail merge) just added more pages to make all the records fit in one document. The other mail merge (file, print, form letter) sticks to two pages, but adds files (instead of pages), to make all the records fit).
The strange thing is, that using this other mail merge (file, print, form letter), the records are not sorted in the original order. This time, sorting the records in the database by a certain field before running the mail merge, did have effect.
However, I now have great many different documents, while I want to have only one document containing all records.
Can anyone please tell how I can run any mail merge in such a way that, all records a sorted by certain field (not sorted in the original order), and, the ouput is only one (not many) document containing all records.
Thank you very very very very very very much in advance. _________________ Not a native English speaker |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8983 Location: Lexinton, Kentucky, USA
|
Posted: Mon Nov 12, 2007 7:25 am Post subject: |
|
|
| Open the merge document, click the Print icon and answer 'yes' to the 'form letter' query. In the dialog you can sort the records and then print all to a single file. Requires version 2.3 or above for saving to a single file from this dialog. |
|
| Back to top |
|
 |
Wandering OOo Enthusiast

Joined: 18 Oct 2007 Posts: 190
|
Posted: Wed Nov 14, 2007 12:32 pm Post subject: |
|
|
| You can also create a query in the database, and with it organize, select, and sort as you need. Then link your mailmerge to the query instead of the table. |
|
| Back to top |
|
 |
|
|
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
|