Topic Options
#39814 - 06/10/12 10:55 PM multi page overflow problem
Karlie Offline
OL Newbie

Registered: 09/05/11
Posts: 26
Loc: New Zealand
Hi,

I have a file which handles invoices and statements for a client. Each client gets an invoice and a statement, or sometimes just one of them. I have set up my files and everything seems to be working except for one thing. Im getting extra pages whens theres an overflow and there also out of order.

What I am getting

Client 1 Ivoice page 1
Client 1 statement page 1
Client 2 invoice page 1
Client 2 Statement page 1
Client 2 Invoice page 2 (overflow page)
Client Statement page 2 (repeat of blank page)

What I want to get

Client 1 Ivoice page 1
Client 1 statement page 1
Client 2 invoice page 1
Client 2 Invoice page 2 (overflow page)
Client 2 Statement page 1


I also want make sure that if there is more than one statement page for a client, that it prints correctly too. As in

Client 3 invoice page 1
Client 3 invoice page 2
Client 3 statment page 1
Client 3 statement page 2

where am i going wrong? sorry for the large post.

Thanks in advance.


Edited by Karlie (06/10/12 10:56 PM)

Top
#39817 - 06/11/12 09:22 AM Re: multi page overflow problem [Re: Karlie]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4532
Loc: Objectif Lune Montreal
Karlie,

Can you tell us what emulation you are using, and in your Repeat, what is your condition to exit and overflow?

Are you also printing front and back, or just simplex?

Regards,
RaphaŽl Lalonde Lefebvre

Top
#39825 - 06/11/12 04:08 PM Re: multi page overflow problem [Re: Raphael Lalonde Lefebvre]
Karlie Offline
OL Newbie

Registered: 09/05/11
Posts: 26
Loc: New Zealand
Hey,

printing is just simplex and the condition to exit and flow I'm using is:

=&iterationcount=13

Im not sure what you mean by emulation.

I'm using a text box with all the data selected (data selection) and then I use the line repeat option to repeat.

Top
#39826 - 06/11/12 04:45 PM Re: multi page overflow problem [Re: Karlie]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4532
Loc: Objectif Lune Montreal
Karlie,

A possibility may be that on your page, you have a total number of iterations that is exactly divisible by 13. (maybe 13 or 26 or 39 records, etc...) What will happen is that it will exit and overflow when it reaches the last line because it has reached an iterationcount of 13, but because it's done with all the lines, it produces an extra page.

You need to modify your condition to handle this, and make sure you check if you've reach the last line of data. You could do this in many ways, depending on how your form is built. For example, if you repeat until line 0(the end of the page), you could use this condition:

=(&iterationcount = 13) and (&current.line < &current.lpp)

This will still check for 13 iterations. However, it will only be true if we still haven't reached the last line(&current.lpp returns the maximum number of lines on your page). If you're on the last line, it will be false, and will not overflow, and therefore, won't be producing blank pages.

A variant of this, you could also stop if you encounter a blank line:

=(&iterationcount = 13) and (@(&current.line,1,200) <> '')

Could be useful if you're repeating a list of items that stops whenever it encounters a blank line. Again, the exact condition could vary depending on how your form is setup.


Now, doing the other part of what you want to do, print all invoices, and then all statements, could be more difficult using just the simple overflow. The way simple overflow works is that whenever it exits and overflow, it will then try to regenerate ALL the pages, not just the page that called the overflow. So if you have one page for invoices, and one for statements, it will execute invoice, then statement. Thus doing:

Client 1 Ivoice page 1
Client 1 statement page 1
Client 2 invoice page 1
Client 2 Statement page 1

Here's an idea I had that you could try if you wanted to get what you want without having to ressort to PressTalk. You will need PlanetPress Workflow. If you have it, my idea would be to use our custom "Sort for N-Up and Telescoping" plugin(available on our web site: http://www.objectiflune.com/OL/en-CA/Download/ResourceCenter/PlanetPressSuite/Plugin.aspx#1 ), and use it to duplicate the records of your data. Check the "Group only" box in order to only duplicate the records, and not actually rearrange them. Don't forget to change the "File Type" to match the type of data that you're using. The result will be your data with duplicated records.

Now, in your form, in your Invoice and Statement pages, you will put the following conditions in their Basic Attributes:

Invoice: =mod(&current.datapage, 2) <> 0
Statement: =mod(&current.datapage, 2) = 0

This will print Invoice for odd records, and Statement for even records. This means that record 1 will print Invoice, and record will print Statement. However, because records 1 and 2 are now duplicates, this means that you'll get all the Invoices, and then all the Statements, for one given customer.

Hope this was clear, and that it helps!

Regards,
RaphaŽl Lalonde Lefebvre

Top