Prerequisites for This Example Create a Simple Report Definition

Building a Report with Graphics, Text, and Color 18-3 WHERE DEPARTMENTS.DEPARTMENT_ID = EMPLOYEES.DEPARTMENT_ID AND EMPLOYEES.JOB_ID = JOBS.JOB_ID ORDER BY DEPARTMENTS.DEPARTMENT_ID

8. Click Next.

9. On the Groups page, click DEPARTMENT_ID and click the right arrow to

move this field to the Group Fields list, then click Next. 10. On the Fields page, move all fields except JOB_ID to the Displayed Fields list, then click Next.

11. On the Totals page, click Next.

12. On the Labels page, change the label Department Id to Department, then click

Next .

13. On the Template page, select Predefined Template and click Blue, then click

Finish to display your report output in the Paper Design view. It should look something like this: Figure 18–2 Paper Design view for the graphics report with one query Note: You can enter this query in any of the following ways: ■ Copy and paste the code from the provided text file called graphics_code.txt into the Data Source definition field. ■ Click Query Builder to build the query without entering any code manually. ■ Type the code in the Data Source definition field. Note: If you are not already connected to a database, you will be prompted to connect to the database when you click Query Builder or Next. Ensure that you connect to a database that has the appropriate schema for this example. Section 18.1, Prerequisites for This Example describes the sample schema requirements for this example. 18-4 Oracle Reports Users Guide to Building Reports

18.3 Modify the Report in the Paper Layout View

The steps in this section show you how to use the various tools in the Paper Layout view to modify the appearance of your report. First, you will move the existing frames to accommodate the changes you will make. You will then add a title to your report, borders around each record, and change the text color. To modify your report: 1. Click the Paper Layout view button in the toolbar to display the Paper Layout view. 2. Make sure the Confine On button in the toolbar is set to Confine mode on. Doing so enables you to move the objects in the Paper Layout view around the canvas.

3. In the Object Navigator, under Paper Layout Main Section Body, click the

item M_G_DEPARTMENT_ID_GRPFR. Notice that, in the Paper Layout view, the outermost frame is selected. 4. Using the arrow keys, move the frame about 2 inches 5 centimeters down and 1 inch 2.5 centimeters to the right. You can use the rulers along the sides of the Paper Layout view as guidance. Your Paper Layout should now look something like this: Figure 18–3 Paper Layout View of Adjusted Report Layout

5. Now, make sure Flex mode is on and click the Confine Off button in the toolbar to

set Confine mode off.

6. Make space for the border you will create that will surround each record. In the

Object Navigator, select M_G_DEPARTMENT_ID_GRPFR again. 7. Drag each corner to make space around the inner repeating frame, so that the layout now looks like the following image. Notice the white space around the groups. Building a Report with Graphics, Text, and Color 18-5 Figure 18–4 Paper Layout View with Expanded Repeating Frame 8. Now, let us make space between each record so that we can later put a horizontal line between the records. In the Object Navigator, click R_G_DEPARTMENT_ID. 9. In the Paper Layout view, click the bottom right corner and drag it down about 0.5 inches 1.5 centimeters so that your layout now looks like this: Figure 18–5 Paper Layout View with Expanded R_G_DEPARTMENT_ID Repeating Frame

10. Save your report as graphics_your_initials.rdf.

18.3.1 Add a border around the report

Now that you have set up your layout, you can start adding new items. In this section, you will add a border around the entire report. To add a border:

1. In the Object Navigator, select the M_G_DEPARTMENT_ID_GRPFR frame.

2. In the Paper Layout view, while the M_G_DEPARTMENT_ID_GRPFR frame is

selected, click the Line Color tool. The tool can be found at the very bottom of the tool palette. 3. In the color palette that displays, choose the black square to make the border black.

4. While the line is still selected, choose Format Line Line Width 2 pt.

5. Now, preview the layout. In the toolbar, click the Paper Design button to run the report to paper. It should look something like this: