Crystal Reports and duplex printing

Monday 16 May 2016 @ 12:56 pm

This has come up twice in recent weeks so it is time to make it a blog article.

The first question is usually this: Can Crystal print on both sides of the paper? This is called “duplex” printing and requires a printer that can print on both sides of a piece of paper. Any program that can print can be used to print in duplex, because duplex is controlled by the printer, not by the program. In other words when Crystal prints 2 pages it is up to the printer to decide if page 2 is on the back of page 1 or if it is on a separate piece of paper. Crystal won’t know or care.
But the second question is a Crystal question. How do I make sure every document starts on an ‘odd’ page when I am printing in duplex?

Say I am printing a series of documents, like purchase orders, in duplex. If the first PO is 3 pages long the next PO would start on the back of the last page of the current PO. So I would need every every PO that has an odd number of pages to generate an extra blank page. That way the next PO can start on it’s own piece of paper.

Here are the steps:

1) Take the group footer that marks the end of the document (e.g. the PO ) and split it into two sections, A and B, leaving the B section empty.

2) Go into the section expert for the B section and check “New Page After”

3) Click the expression button next to “New Page Before” and put in the following:

Remainder (PageNumber, 2 ) = 1

4) If you need to reset the page number for each group, put in that checkmark in this B section as well.

5) Click the expression button next to the “Suppress” for this section and put in the following:

Remainder (PageNumber, 2) = 1 and not OnLastRecord

I have read several forum threads on this but haven’t seen anyone that mentions step 5. That is because the problem that step 5 solves only shows up in rare cases. But lets say that the details and GF1A fill 2 pages exactly to the bottom of the page. Even if GF1B is very small it will create a new page all by itself and that will be an odd page. In this case the next group will start on an even page. So I have found that by adding the condition in step 5 that rare problem won’t occur.

(For examples of my most popular formulas, please visit the FORMULAS page on my website.)







Leave a Reply

Recrystallize Pro