Conditional Formatting

For customizable reports such as confirmation letters and guest folios, it is often necessary to include text or field items only under specific conditions. Running the Oracle Report Builder application from System Configuration>General>Report Setup, selecting your report, selecting Edit and Layout, offers the ability to use conditional formatting for an item using PL/SQL code.

Confirmation Letter Example

Within the layout mode of Oracle Report Builder, you are able to add a text object with the T tool. Drag an area on the report and enter your label text. To define that this label (text) object should only be displayed for specific conditions, you need to access the object’s properties palette.

Selecting the object with the mouse will result in the display of sizing handles around the object. Click the right mouse button over the object to display the context sensitive menu.

Note: You can also press F4 to activate the Property Palette.

Property Palette

The Conditional Formatting property will allow you to define the formatting for this object based on specific conditions. One of these formatting options is to hide the object completely. Select the button to activate the Condition Wizard. The Wizard replaces the need to write PL/SQL code to define conditional format triggers.

Select New.

This object will only display if the condition shown in the example above is not met. If this condition is found to be True, the object is set to hidden. In the example above, if the reservation type of the reservation is ‘1’, ‘5’ or ‘9’ then it will display this paragraph (object). Otherwise (else) the object is not displayed – remaining hidden.

The paragraph is hidden, as the reservation type does not equal 1, 5 or 9.

Creating the .REP and .RDF Files

When you have completed the changes that you need on the report, you will need to compile it into an .RDF file and a .REP file.