In this chapter, you will learn about tabular reports, the most basic report style. By following the steps in this chapter, you can generate the report output shown in Figure 5-1.
A tabular report is the most basic type of report you can build. The report output is organized in a multicolumn, multirow format, with each column corresponding to a column in the database table. In this example, the column labels Department Id, Department Name, Manager Id, and Location Id are derived from the columns in your SQL
SELECT statement, but you can modify column labels as you wish.
Generally, the first step is to define the data Oracle Reports should fetch from the database by creating a query that contains a
SELECT statement. Although this example report uses only one query, reports can contain any number of queries.
For each query you create, Oracle Reports automatically creates one default group. The default query names are
Q_2, and so on. The default group name is
fieldname is the first field of the table specified in the query. For example, if the first field of the table
FIRSTNAME, then the default group name is
For each database column you specify in the query's
SELECT statement, Oracle Reports creates a report column and assigns it to the group. By default, the columns appear in the order in which you enter them in your
SELECT statement. The default column names are generated from the database column names or replaced by any aliases specified in your
If you select two or more columns with the same name, the first column is given the default name, the second column is given the default name with a 1 appended to it (for example,
Deptno1, and so on).
Before you can run your report, you must specify the layout (that is, the format) of the report output. If you do not, Oracle Reports will fetch the data but will not display it; you may receive an error message, depending on whether you choose paper or Web layout.
For this example report, you will use the tabular layout style, which is one of eight styles provided by Oracle Reports. The tabular layout displays data in a series of columns running down the page, with the column headings displayed directly above the columns.
As you build this example report, you will:
Use the Report Wizard to Create a Report with a paper layout that includes one query to select all of the columns displayed in this report. Oracle Reports will create all other necessary objects (for example, groups and columns) by default.
To see a sample tabular report, open the examples folder named
tabular, then open the Oracle Reports example named
tabular.rdf. For details on how to open it, see "Accessing the Example Reports" in the Preface.