Oracle Reports Building Reports 10g (9.0.4) Part Number B10602-01 |
|
Reports Builder enables you to modify the look of your report in multiple ways. In this example, you will build an across group report that prints the values of a database column across the page instead of down.
In across reports with breaks, the master (or break) group prints "top to bottom"; i.e., as it would in other master/detail reports. However, the values in the detail group print across the page, from left to right. When there are more values than will fit on a line, Oracle Reports wraps the line and prints the remaining values across the page on the next line.
For more information on break reports, refer to the Reports Builder online help (choose Index, then type "break report" in the box).
This example uses two queries that select all of the columns displayed. You'll link them to establish a master/detail relationship. Oracle Reports creates all other necessary data objects by default.
To see a sample across report with control breaks, open the examples folder called acrossbreak
, then open the Oracle Reports example report named acrossbreak.rdf
. For details on how to open it, see "Accessing the example reports" in the Preface.
Feature | Location |
---|---|
Manually create a data model with two queries. |
|
Create the default layout using the Report Block Wizard. |
|
Run your report to paper. |
To build the example in this chapter, you must have access to the sample schema provided with the Oracle9i database. If you don't know if you have access to this sample schema, contact your database administrator. You should have access to the "Human Resources" portion of the schema to complete this example.
When you create a report, you can either use the Report Wizard to assist you or create the report yourself. In this example, you will use the Data Model view to create your two queries, then use the tool palette to create a data link between the two queries to relate the data tables.
SELECT ALL DEPARTMENTS.DEPARTMENT_ID, DEPARTMENTS.DEPARTMENT_NAME, DEPARTMENTS.MANAGER_ID, DEPARTMENTS.LOCATION_ID FROM DEPARTMENTS
SELECT ALL EMPLOYEES.LAST_NAME, EMPLOYEES.FIRST_NAME, EMPLOYEES.DEPARTMENT_ ID FROM EMPLOYEES ORDER BY EMPLOYEES.LAST_NAME
Your data model should now look like this:
The steps in this section show you how to use the Report Block Wizard to create the layout and choose how your data will display in your report. Here, you will choose the style of report you want to create, and choose to display the data across the report (hence creating the across group report).
In this section, you will run your report to the Paper Design view so you can see how your report displays.
Save your report as acrossbreak_<your initials>.rdf
.
Congratulations! You have successfully created a across group paper report. You now know how to:
For more information on any of the wizards, views, or properties used in this example, refer to the Reports Builder online help, which you can access in two ways:
http://otn.oracle.com/products/reports/
), click Documentation and navigate to the Reports Builder Online Help for the most recent, hosted online help.
|
Copyright © 2002, 2003 Oracle Corporation. All Rights Reserved. |
|