Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Duplex Printing

I have a report that generates patient statements. Each new patient number get's put on a new page. I'd like to be able to print these duplexed, but I need to be able to make sure each patient get's put on an odd page. Any idea how to do this?



Former Member

Hi Bernard,

I you have a group on Patients number, you can try the following steps that will enable printing in this manner:

Printing a certain group field only at the top of every odd page:

Solution 1:

1. In the event that a blank back page is generated (when the data for a particular group does not exceed a single page), you need to suppress Group Headers #1 and #2.

· Go to Format | Section and conditionally suppress these two Group Headers using the following code:

Remainder(PageNumber, 2) = 0

This ensures that these two Group Headers are not printed on the back page (even numbered pages) when the page does not contain any data for the innermost group.

2. Insert a section below for Group Header #3. The result is Group Header #3a and #3b. This can be done right-clicking in the grey margin at left,' where it reads: Group Header #3. Choose Insert Section Below.

3. Format Group Header #3a to conditionally generate a New Page After. Click the Formula command button (X + 2) to the right of the New Page After box, and insert the following line of code:

not OnFirstRecord and Remainder(PageNumber, 2) = 0

This 'forces' a new page after Group Header #3a generates when the page number is EVEN, excluding the Group Header that is the first one generated for the report.

You cannot suppress or hide the GH#3a section without it affecting the #3b section, so you need to 'grab' the bottom border of the section and 'drag' it up until it's right up against the top border of the section. This reduces the height of the GH#3a section so that it's not visible on the report.

4. Group Header #3b contains and displays the field. No conditional formatting is necessary for this section.

5. Group Footer #3 will also have to conditionally generate a New Page After. Go to Format | Section and click the X+2 button to the right of the New Page After property. Enter the following line of code into the Formula Text editor:

not OnLastRecord

This ensures that a new page is inserted after Group Footer #3 every time that section is generated, except when on the last record in the report. This eliminates an extra blank page being printed at the end of the report.

Solution 2:

1. On the 'Insert' menu, click Group, and select the field so the report is grouped by company.

2. On the 'Format' menu, click 'Section'. This opens the Section Expert.

3. In the 'Sections' list, click the Group Footer, then select the 'New Page After' check box. This ensures each new company/group starts on a new page.

4. In the 'Sections' list, click Group Header, and click 'Insert'. This inserts an additional Group Header section, so now there is a Group Header 'a' and a Group Header 'b'.

5. In the 'Sections' list, click Group Header a, then click 'X+2' beside the 'New Page After' check box. This opens the Conditional Formatting Formula Editor. Type this formula:

Not OnFirstRecord

· This prevents Crystal Reports from inserting a blank page as the first page of the report.

· Save and close the Formula Editor to return to the Section Expert.

6. With Group Header a still highlighted, click 'X+2' beside the 'Suppress' check box. Type this formula:

Remainder(PageNumber,2) <> 0

//Suppresses Group Header 'a' on

//odd-numbered pages

· Save and close the Formula Editor to return to the Section Expert.

· Click 'OK' to return to the report.

Now the report inserts blank pages where necessary so new companies only print on odd-numbered pages.


Abhijeet Taskar.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question