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

How do I merge data into a form that prints 3 per page?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
Bug
OOo Advocate
OOo Advocate


Joined: 29 Oct 2005
Posts: 336

PostPosted: Wed Jul 30, 2008 1:47 pm    Post subject: How do I merge data into a form that prints 3 per page? Reply with quote

I have a form that takes up only 1/3 of a letter-sized page, and I want to print three forms per page. I also want to merge data into fields of the form from a registered database, but again while printing three forms per page. I have figured out how to merge the data into the right spot with one form at the top of the page, but this prints one form per page. I really need three forms on a single page, but with the data fields printing the merged data (same fields, consecutive info). I looked for some kind of break or something that would tell Writer to repeat the form again on the same page, but I couldn't find anything like this.

I hope I've describe my issue well. Is it possible to do what I'm trying to do in Writer?
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


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

PostPosted: Wed Jul 30, 2008 3:05 pm    Post subject: Reply with quote

Here's one way.

Do the top 1/3ed including the fields. Go to the end of this and do Ctrl+F2 > Database tab and insert the Next Record field. If you want to apply formatting to your field then select them and do so. Copy everything twice below itself to complete the page.

To print click the Print icon, answer 'yes' to the 'form letter' query and you can print all or selected records.

BTW, this is another way to set a catalog of the records in your DB.
Back to top
View user's profile Send private message
Bug
OOo Advocate
OOo Advocate


Joined: 29 Oct 2005
Posts: 336

PostPosted: Wed Jul 30, 2008 4:15 pm    Post subject: Reply with quote

Thanks, you've been most helpful. What you say here works pretty well. You've moved me toward what I'm trying to learn. I was able to get four forms per page, not three. This is what I actually needed, and it worked fairly well.

Some weird problems though:

First, if I print "All" records to a file or the printer, everything is just about fine. (See the third problem for the "just about".) If I chose to print from record 1 to 10, the print job starts at record 9 and prints 10, but not 11. In any case, it does not start with 1 and go to 10 as it should.

Second, even though there are 376 records in the Sheet, only 1 - 12 show up in the preview window after pressing F4.

Third, the second to last page of the print job of "all records" has one entry on top, followed by totally blank space. The last page has the final two records of the db, which are not the ones after the record at the top of the blank page. They are instead the final two records, and one is being skipped. By coincidence, the first column of the record being skipped is the "Last Name" column, and the record being skipped has a last name that is identical to the one on top of the page that has the blank space. I have two other records with the same last names. They're in the middle of the db and give no problems, so this may be a coincidence. But the problem of the blank space on the second to last page is real regardless.

Fourth, the last page, since it only has two records printed, nevertheless prints the form again with empty spaces where the values would be. These can be removed in a file obviously, but not in a direct print job.

Fifth, even though there is a footer with a page number field at the bottom of the original page where I set up the form and fields, every page in the final merge, print job or file, is numbered 1. (After looking into this problem, I made a whole new post for it.)
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


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

PostPosted: Thu Jul 31, 2008 6:58 am    Post subject: Reply with quote

OK, at least part of the problem is my fault. It seems that when you preform the merge in the way it outlined that OOo automatically inserts the Next Record field at the bottom of the page. This means there are 2 Next Record fields there so a record will be skipped between each page.

Solution - turn on View > Field Names, delete the last Next Record field and turn off View > Field Names.

Having fixed this problem I have no problem printing records 1-10 from the Bibliography DB and when I print all records my next to last page looks fine.

Use of the macro I pointed you to previously may well solve the footer problem which I don't think can otherwise be solved.
Back to top
View user's profile Send private message
Bug
OOo Advocate
OOo Advocate


Joined: 29 Oct 2005
Posts: 336

PostPosted: Thu Jul 31, 2008 12:49 pm    Post subject: Reply with quote

Thanks for your help again. I regret to say when you said "run this macro" in the other thread, I never understood what macro you were talking about:

http://www.oooforum.org/forum/viewtopic.phtml?p=292176

It's a grave deficiency that Writer does not support page numbers in a "catalog" style merge. This seems to be a common need for anyone who wants to print a directory or catalog, etc. The problem really comes from the "automatically inserted page," which if truth be told is a bug in the software.
Back to top
View user's profile Send private message
Bug
OOo Advocate
OOo Advocate


Joined: 29 Oct 2005
Posts: 336

PostPosted: Thu Jul 31, 2008 2:12 pm    Post subject: Reply with quote

Another thought. What happens if, in deleting the last Next Record field at the bottom of the page, the data from the last, or maybe second-to-last, record on a page, is long enough to go onto the next page? Wouldn't this mean that the top of the next page would have no Next Record field, and that therefore the document would end there?

The eventuality would happen for example if the merge contained the names of customers and the items purchased. The resulting file would have records with inconsistent lengths, which would seem in theory to result in the problem in the paragraph I wrote above. The last record on the original merge page would not always be the last record on each page of the resulting, final merge.
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


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

PostPosted: Fri Aug 01, 2008 11:22 am    Post subject: Reply with quote

Quote:
I regret to say when you said "run this macro" in the other thread, I never understood what macro you were talking about:
I can understand that as I failed to give you the link to the macro. I have now edited that post but here it is.
http://www.oooforum.org/forum/viewtopic.phtml?t=29291&highlight=mail+merge

Quote:
The problem really comes from the "automatically inserted page,"
Any time you do mail merge with a document containing an odd number of pages you will get the blank pages. The workaround is to create a document with an even number of pages.

For your 3 to a page document insert the Next Record field back at the end, do Ctrl+A and copy. Go to the end of the document, do Ctrl+Enter to cause a page break and paste page 1 into the new page 2. Remove the last Next Record field in page 2.
Quote:
Another thought. What happens if, in deleting the last Next Record field at the bottom of the page, the data from the last, or maybe second-to-last, record on a page, is long enough to go onto the next page?
I don't think this presents a problem except the some record's data will be split between two pages.
Back to top
View user's profile Send private message
Bug
OOo Advocate
OOo Advocate


Joined: 29 Oct 2005
Posts: 336

PostPosted: Fri Aug 01, 2008 12:44 pm    Post subject: Reply with quote

Quote:
Quote:

Another thought. What happens if, in deleting the last Next Record field at the bottom of the page, the data from the last, or maybe second-to-last, record on a page, is long enough to go onto the next page?

I don't think this presents a problem except the some record's data will be split between two pages.

But isn't it true that since the record that is split between two pages will not contain a Next Record field, the automatic Next Record that comes with a page break will not come till the end of the rest of the page, which would be blank. (I'm theorizing here because I have not encountered this yet. I'm trying to prepare for this eventuality.)

Also, I imagine some kind of "keep together" command might exist for preventing a record from splitting between two pages?

Quote:
For your 3 to a page document insert the Next Record field back at the end, do Ctrl+A and copy. Go to the end of the document, do Ctrl+Enter to cause a page break and paste page 1 into the new page 2. Remove the last Next Record field in page 2.

Why will it not skip a record between the end of pg one and the beginning of pg 2? Maybe I'm misunderstanding. Maybe it is true that only the last page of the merge inserts the Next Record field automatically? If this were so, it would clear up my confusion.

Thanks for the link to the macro. I thought something was amiss in the other post.
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


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

PostPosted: Fri Aug 01, 2008 1:13 pm    Post subject: Reply with quote

Quote:
Also, I imagine some kind of "keep together" command might exist
You can set this for each paragraph for one record except the last one. Format > Paragraph > Text Flow tab / Keep with next paragraph.
Quote:
Maybe it is true that only the last page of the merge inserts the Next Record field automatically? If this were so, it would clear up my confusion.
You got it.
Back to top
View user's profile Send private message
Bug
OOo Advocate
OOo Advocate


Joined: 29 Oct 2005
Posts: 336

PostPosted: Fri Aug 01, 2008 1:27 pm    Post subject: Reply with quote

Thank you again. This has been incredibly enlightening. What do you mean by "for each paragraph for one record except the last one"? Do you mean that the "keep with next paragraph" cannot be applied to the last record on the page where the merge fields are? Or do you mean that it should not be applied to the last paragraph in each record?
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


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

PostPosted: Sat Aug 02, 2008 6:45 am    Post subject: Reply with quote

I mean the last paragraph of each record without regard to where it is on the screen page. Due to your speculation about the potential long lengths of fields we don't know exactly where on a printed sheet a particular record may fall.

Name 'Keep with
Address 'Keep with
City, State Zip
Back to top
View user's profile Send private message
Bug
OOo Advocate
OOo Advocate


Joined: 29 Oct 2005
Posts: 336

PostPosted: Sun Aug 03, 2008 6:17 pm    Post subject: Reply with quote

Supposing, as in the original question, I knew that the form would fit exactly three per page, regardless of the records. In that case, I infer that the "keep together" be applied universally to all paragraphs of a record. This is correct?

JohnV wrote:
I mean the last paragraph of each record without regard to where it is on the screen page. Due to your speculation about the potential long lengths of fields we don't know exactly where on a printed sheet a particular record may fall.
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


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

PostPosted: Mon Aug 04, 2008 3:17 pm    Post subject: Reply with quote

If you know that you are going to get three per page even when the fields are merged then you don't any "keep together". Your assumption this time is that no record will be split between 2 pages. You are going in a circle.
Back to top
View user's profile Send private message
Bug
OOo Advocate
OOo Advocate


Joined: 29 Oct 2005
Posts: 336

PostPosted: Mon Aug 04, 2008 4:14 pm    Post subject: Reply with quote

You're right. What I don't understand is how the records expected to be variable will be kept together if the last paragraph of all the records is not set to "keep together". This is what confuses me. I am under the impression that the last line of some records may run onto a second page, defeating the purpose, to a degree, of the "keep together".
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org 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