Prerequisites for This Example Use the Report Wizard to Create a Form Letter Report

Building a Form Letter Report 7-3

8. Click Next.

9. On the Text page, format the letter the way you want it to appear. The steps that follow will show you how to make your form letter report look like this: Employee: FIRST_NAME LAST_NAME Emp. : EMPLOYEE_ID Dear FIRST_NAME LAST_NAME: The Human Resources department is updating its records of the companys employees. Currently, our records show your employee number as EMPLOYEE_ID, and that you hold the position of JOB_TITLE. If any of this information is incorrect, please contact the Human Resources department. Thank you, Human Resources 10. In the Form Letter Text box, type Employee:.

11. Click Space four times to enter four spaces.

12. In the Available Fields list, click FIRST_NAME, then click the right arrow to

move this field to the Form Letter Text field. 13. In the Available Fields list, click LAST_NAME, then click the right arrow . 14. Click New Line. 15. In the Form Letter Text field, type Emp. :. 16. Click Space four times to enter four spaces. 17. In the Available Fields list, click EMPLOYEE_ID, then click the right arrow . 18. Click New Line twice. 19. In the Form Letter Text field, type Dear. Note: You can enter this query in any of the following ways: ■ Copy and paste the code from the provided text file called formletter_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 7.1, Prerequisites for This Example describes the sample schema requirements for this example. 7-4 Oracle Reports Users Guide to Building Reports

20. Click Space.

21. In the Available Fields list, click FIRST_NAME, then click the right arrow .

22. In the Available Fields list, click LAST_NAME, then click the right arrow .

23. In the Form Letter Text field, type a colon : next to LAST_NAME, then click

New Line twice.

24. Type the body of the letter. For the field names, use the Available Fields list to

select the appropriate name, then click the right arrow to insert it into the Form Letter Text field. The result should look like this: The Human Resources department is updating its records of the companys employees. Currently, our records show your employee number as EMPLOYEE_ID, and that you hold the position of JOB_TITLE. If any of this information is incorrect, please contact the Human Resources department. Thank you, Human Resources

25. Click Next.

26. On the Template page, select Predefined Template and click Beige, then click

Finish to display your report output in the Paper Design view. It should look something like this: Figure 7–2 Paper Design view for the form letter report

27. Save the report as formletterreport_your_initials.rdf.

7.3 Summary

Congratulations You have successfully created a form letter paper report. You now know how to: ■ define a form letter report layout using the Report Wizard. For more information on any of the wizards, views, or properties used in this example, refer to the Oracle Reports online Help, which is available in Oracle Reports Builder or hosted on the Oracle Technology Network OTN, as described in Section 4.1.1, Using the Oracle Reports online Help . Building a MasterMaster Report 8-1 8 Building a MasterMaster Report In this chapter, you will learn about mastermaster reports. By following the steps in this chapter, you can generate the report output shown in Figure 8–1 . Figure 8–1 MasterMaster report output Figure 8–2 MasterMaster report output Concepts A mastermaster report displays at least two sets of data that are not directly related—that is, the records constituting the data are fetched using at least two separate queries. A mastermaster report also called a parentparent report contains two or more queries with no links parentchild relationships. Data Relationships Although the data may be conceptually related, the queries make no attempt to relate it by the manner in which it is fetched. To select the data for a mastermaster report, you create two or more unrelated queries. Reports Builder will create all other necessary data objects by default.