Create a second formula column for total compensation

Building a Report that Includes PLSQL 40-11 When you are done, the Object Navigator should look like this: Figure 40–11 Object Navigator with M_NAME repeating frame

23. Click the Paper Design button in the toolbar to display the report in the Paper

Design view. 24. In the Paper Design view, Shift-click the values under the following columns: ■ Salary ■ Commission ■ Bonus ■ Total Compensation 25. Click the Currency button in the toolbar to add to the numbers.

26. Click the Add Decimal Place button twice to add two decimal points to the

numbers.

27. Shift-click the Salary, Commission, Bonus, and Total Compensation column

headings to select them too.

28. Click the Align Right button to right justify the columns.

Your report should now look something like this: Figure 40–12 Paper Design view of modified report

29. Save your report.

Tip: You can watch the fields in the Object Navigator as you choose Layout Move Backward. When you see the two fields are sub-nodes of M_NAME, stop. 40-12 Oracle Reports Users Guide to Building Reports

40.5 Add Vertical Space Between Records

To make the report more readable, you can add space between a certain number of records. To do so, you first create the parameter that determines the number of records between which the space will display. Then, you create a summary column in the data model that counts the number of records. You will then modify the paper layout of your report so that the vertical elasticity is variable. Finally, you will create a format trigger that will display the space between the user-determined number of records.

40.5.1 Create a user parameter

The parameter you will create in this section will determine how many records are displayed before an extra space is printed. Since this parameter is a user parameter, the user can change this value at runtime. To create a user parameter:

1. In the Object Navigator, under the Data Model node, click the User Parameters

node.

2. Choose Edit Create to create a new user parameter under the User Parameters

node. 3. If the Property Inspector is not already displayed, right-click the new user parameter P_1, then choose Property Inspector to display the Property Inspector, and set the following properties: ■ Under General Information, set the Name property to SPACE. ■ Under Parameter, set the Datatype property to Number, and set the Initial Value property to 5. The user parameter now displays in the Object Navigator: Figure 40–13 User Parameter in the Object Navigator

4. Save your report.

40.5.2 Create a summary column that counts the number of records

In this section, you will create a summary column in the data model that counts the number of employee records. This information will then be used by the format trigger to determine where to add extra space. Note: By giving the user parameter an initial value, the user can simply run the report without changing the parameters, and a space will display between every five records.