Reports with Different Left and Right Margins

Description

It possible to format a report, so that alternate pages will have different left and right margins. This technique requires two steps:

  • Placement of a conditional object on the report layout with two layers that responds to the calculated value.

  • Placement of differently formatted report content on the two layers of the conditional object.

Creating the Conditional Object

  1. Open the report in the Report Editor.

  2. Display the Toolbox.

  3. Select the Conditional Object tool and draw a box in the Detail section of the report. This box should be the width of the page and tall enough to contain all fields.

  4. Define two layers for the conditional object.

    • 1. Right click on the conditional object and select Properties... .

    • 2. Display the Setup tab.

    • 3. Enter the following expression in the Condition Expression field: mod(System->PageNumber,2)=1

    • 4. Enter the following text in the Label field: "odd".

    • 5. Enter the following expression in the Condition Expression field: mod(System->PageNumber,2)=0

    • 6. Enter the following text in the Label field: "even".

    • 7. Click OK.

Place The Report Content

  1. Right click on the conditional object and select "odd".

  2. Place the fields of the report as they would appear on an odd numbered page.

  3. Right click on the conditional object and select "even".

  4. Place the fields of the report again, as they would appear on an even numbered page.

  5. Save the report and exit the Report Editor.

Save the report and exit the Report Editor.

If the Detail section has Repeating Header and Repeating Footer sections, you may wish to place similar two layered conditional objects with field labels and/or calculated fields. The following picture shows a simple report layout. The two frames show the field placement on the "odd" and "even" layers of the condtional object. The yellow highlighting is only to make the fields easier to see.

images/UG_Report_Alternate_Page_Margins.gif

See Also