Skip Headers
Oracle® Fusion Middleware Oracle Reports User's Guide to Building Reports
11g Release 1 (11.1.1)

Part Number B32122-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

6.2 Use the Report Wizard to Create a Mailing Label Report

When you create a report, you can either use the Report Wizard to assist you or create the report yourself. To build the simple report in this example, you can use the Report Wizard. Using the wizard enables you to define the layout for the report, as well as set the data definition.

To create a simple mailing label report:

  1. Launch Reports Builder (or, if already open, choose File > New > Report).

  2. In the Welcome or New Report dialog box, select Use the Report Wizard, then click OK.

  3. If the Welcome page displays, click Next.

  4. On the Report Type page, select Create Paper Layout Only, then click Next.

  5. On the Style page, type a Title for your report, select Mailing Label, then click Next.

  6. On the Data Source page, click SQL Query, then click Next.

  7. On the Data page, click Query Builder.

  8. In the Select Data Tables dialog box, click the EMPLOYEES table, then click Include.

  9. Click the DEPARTMENTS table, then click Include.

    Note:

    In this case, you must include the DEPARTMENTS table since the EMPLOYEES and LOCATIONS tables are not directly related in the schema.

  10. Click the LOCATIONS table, then click Include.

  11. Click Close.

    The three tables display in the Query Builder.

  12. In the EMPLOYEES table, select the check boxes next to the following column names:

    • FIRST NAME

    • LAST NAME

    • EMPLOYEE ID

  13. In the LOCATIONS table, select the check boxes next to the following column names:

    • STREET ADDRESS

    • POSTAL CODE

    • CITY

    • STATE PROVINCE

    • LOCATION ID

  14. Click OK.

  15. In the Data Source definition field, your query should look something like this:

    SELECT ALL EMPLOYEES.EMPLOYEE_ID, EMPLOYEES.FIRST_NAME, 
    EMPLOYEES.LAST_NAME, LOCATIONS.STREET_ADDRESS, LOCATIONS.POSTAL_CODE, 
    LOCATIONS.CITY, LOCATIONS.STATE_PROVINCE, LOCATIONS.LOCATION_ID
    FROM EMPLOYEES, DEPARTMENTS, LOCATIONS
    WHERE ((EMPLOYEES.DEPARTMENT_ID = DEPARTMENTS.DEPARTMENT_ID)
     AND (DEPARTMENTS.MANAGER_ID = EMPLOYEES.EMPLOYEE_ID)
     AND (DEPARTMENTS.LOCATION_ID = LOCATIONS.LOCATION_ID))
    

    Note:

    You can enter this query in any of the following ways:

    • Copy and paste the code from the provided text file called mailinglabel_code.txt into the Data Source definition field.

    • Click Query Builder to build the query without entering any code manually, as described in the steps above.

    • Type the code in the Data Source definition field.

  16. Click Next.

    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 6.1, "Prerequisites for This Example" describes the sample schema requirements for this example.

  17. On the Text page, format the way you want the mailing labels to display. Steps 21 through 30 will show you how to display your labels in the following format:

    John Smith
    55 Main Street
    Springfield, ME 00000
    
  18. In the Available Fields list, click FIRST_NAME, then click the right arrow (>) to move this field to the Mailing Label list.

  19. In the Available Fields list, click LAST_NAME, then click the right arrow (>).

  20. Click New Line.

  21. In the Available Fields list, click STREET_ADDRESS, then click the right arrow (>).

  22. Click New Line.

  23. In the Available Fields list, click CITY, then click the right arrow (>).

  24. Press Backspace on your keyboard to remove the extra space.

  25. Click Comma.

  26. In the Available Fields list, click STATE_PROVINCE, then click the right arrow (>).

  27. In the Available Fields list, click POSTAL_CODE, then click the right arrow (>).

    The code in the Mailing Label Text box should look like this (if necessary,add spaces as shown):

    &<FIRST_NAME> &<LAST_NAME> &<STREET_ADDRESS> &<CITY>, &<STATE_PROVINCE> &<POSTAL_CODE> 
    

    Tip:

    For more information on formatting your mailing labels, click Help on this page of the Report Wizard.

  28. Click Next.

  29. On the Template page, select No Template and click Finish to display your report output in the Paper Design view. It should look something like this:

    Figure 6-2 Paper Design view for the mailing label report

    Description of Figure 6-2 follows
    Description of "Figure 6-2 Paper Design view for the mailing label report"

  30. Save your report as mailinglabel_your_initials.rdf.