Prerequisites for This Example Create the Data Model and Layout

23-4 Oracle Reports Users Guide to Building Reports 9. Type the first paragraph of your letter in the Form Letter Text window: Dear Employee ENAME, Mark your calendar You are invited to attend the Summit Sporting Goods annual picnic on June 15, from 11:00 AM to 6:00 PM. Be prepared for lots of food, lots of entertainment, and lots of fun.

10. Click Next.

11. On the Template page, select No template, then click Finish to preview your

report output in the Paper Design view. 12. Save the report as condform_your_initials.rdf.

23.3 Add Additional Text

After you add the basic text in the Report Wizard, you need to create some additional text. The text must reside inside of the repeating frame, so before you add text, you will resize the repeating frame. To resize the repeating frame: 1. Click the Paper Layout button in the toolbar to display the Paper Layout view.

2. In the Object Navigator, type R_G_ENAME in the Find field to locate it.

3. Click R_G_ENAME to select it. It is simultaneously selected in the Paper Layout

view. 4. Click the title bar of the Report Editor to make it the active window. 5. Click the bottom handle of R_G_ENAME and drag it down about 4 inches 10 centimeters. To add more text: 1. Click the Text tool in the tool palette. 2. Click about 0.25 inches 0.5 centimeters below the first text object. 3. Type the following text: Because youre one of our top sales representatives, we would like to invite you to a celebration dinner after the picnic. Employees such as yourself brought in over 10 million in increased revenues this year, a 15 increase over last year. The 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 23.1, Prerequisites for This Example describes the sample schema requirements for this example. Tip: Be sure to include hard returns at the end of each line. Building a Conditional Form Letter Report 23-5 dinner will be held at the City Inn from 7:00 PM to midnight. Dinner will be served at 7:30 PM. Please reply to Human Resources if you plan to attend. 4. Click once in an open area of the Paper Layout view.

5. Choose Tools Property Inspector to display the Property Inspector for the

boilerplate text object: ■ Under General Information, set the Name property to B_SALESREP. 6. Click the title bar of the Report Editor to make it the active window again. 7. Repeat the steps above, but this time use the following text and name it B_ALL2: We would also like to take this opportunity to thank you for all of your efforts over the last year. As a result of your hard work, company revenues increased 15. 8. Again, repeat the steps above, but this time use the following text and name it B_ ALL3: I look forward to seeing you there J. King President Summit Sporting Goods

9. Rename the original text object to B_ALL by selecting it and choosing Tools

Property Inspector to set the Name property.

23.4 Add Logic for Text

The text in B_SALESREP and B_ALL2 applies only to some employees. Hence, you need to apply a condition to each one to determine when it should appear. You also need to ensure that objects for example, B_ALL2 and B_ALL3 move up in the layout whenever objects above them for example, B_SALESREP and B_ALL2 do not print. Otherwise, you will have large gaps in your report output for employees who do not get all of the objects. To achieve this, you must anchor the text objects together. To create collapsing anchors: 1. In the Paper Layout view, click the Anchor tool in the tool palette. 2. Click and drag a line from the top left corner of B_SALESREP the second text object to the top left corner of B_ALL the first text object. Double-click to create the new anchor object.

3. Choose Tools Property Inspector to display the Property Inspector for the

anchor object: ■ Set the Child Edge Percent and Parent Edge Percent properties to 0. ■ Set the Collapse Vertically property to Yes. 4. Click the title bar of the Report Editor to make it the active window again. 5. Repeat the steps above, but this time drag from top left corner of B_ALL2 to the top left corner of B_SALESREP.