The steps in this section will show you how to build a simple data model with two queries in a master/detail relationship.
Launch Reports Builder (or, if already open, choose File > New > Report).
In the Welcome or New Report dialog box, select Build a new report manually, then click OK.
In the Data Model view that displays, click the SQL tool in the tool palette, then click in an open area of the Data Model view to display the SQL Query Statement dialog box.
In the SQL Query Statement dialog box, type the first SELECT
statement:
SELECT * FROM DEPT ORDER BY DEPTNO
Note:
You can enter this query in any of the following ways:Copy and paste the code from the provided text file called suppresslabels_code.txt
into the SQL Query Statement field.
Click Query Builder to build the query without entering any code manually.
Type the code in the SQL Query Statement field.
Also note that if you have not installed the Pictures table into the sample schema, you will not be able to create this query.
Click OK.
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 21.1, "Prerequisites for This Example" describes the sample schema requirements for this example.When the query displays in the Data Model view, right-click the query name (Q_1), then choose Property Inspector from the pop-up menu to set the following property:
Under General Information, set the Name property to Q_DEPT.
Follow the steps above to create another query named Q_EMP, with the following SELECT
statement:
SELECT DEPTNO, ENAME, JOB FROM EMP ORDER BY ENAME
In the Data Model view, click the Data Link tool in the tool palette.
Drag a link between DEPTNO in Q_DEPT and DEPTNO1 in Q_EMP. Your data model should now look like this:
Figure 21-2 Data Model view of the Suppress Labels report
Save your report as suppresslabels_
your_initials
.rdf
.