Академический Документы
Профессиональный Документы
Культура Документы
Data model group is nothing but grouping the data columns based on the requirement. In other words it s
like creating parent child relationship for set of columns.
In the previous lesson we have specified relationship between two different queries using DATA LINK.
However, Instead of creating separate queries and adding a data link we can directly use a single select
statement and grouping the data in data model as per the hierarchy/ relationship.
SQL>SELECT d.deptno,
d.dname,
d.loc,
e.empno,
e.ename,
e.sal,
e.deptno
FROM emp e, dept d
WHERE e.deptno=d.deptno
newtonapples.com/oracle-report-data-model-groups/
2/18
9/1/13
Click on OK.
Then system will ask for database connection and provide proper database connection username, password
and database as shown below.
newtonapples.com/oracle-report-data-model-groups/
3/18
9/1/13
newtonapples.com/oracle-report-data-model-groups/
4/18
9/1/13
Now we are grouping the data by dragging the fields from main group and make it as subgroup which is
shown below. Just like parent and child groups. i.e for every department number we will have employee
information.
This way we can avoid DATALINKS.
newtonapples.com/oracle-report-data-model-groups/
5/18
9/1/13
As our data model is ready, now create layout using report wizard method.
Right click on the query Q_1 to get into report wizard.
select Report Wizard shown below.
newtonapples.com/oracle-report-data-model-groups/
6/18
9/1/13
newtonapples.com/oracle-report-data-model-groups/
7/18
9/1/13
Click on NEXT, then it will ask to choose a Query Type. select Query type SQL Statement:
newtonapples.com/oracle-report-data-model-groups/
8/18
9/1/13
Click on NEXT, and then you will find the query which is already entered
newtonapples.com/oracle-report-data-model-groups/
9/18
9/1/13
Click on NEXT, click on the icon with >> symbol so that all the available fields moves into Displayed Fields.
newtonapples.com/oracle-report-data-model-groups/
10/18
9/1/13
Click on NEXT
newtonapples.com/oracle-report-data-model-groups/
11/18
9/1/13
newtonapples.com/oracle-report-data-model-groups/
12/18
9/1/13
Click on NEXT
newtonapples.com/oracle-report-data-model-groups/
13/18
9/1/13
Click on NEXT and select the preferred template which ever you want as show in below figure:
newtonapples.com/oracle-report-data-model-groups/
14/18
9/1/13
Click on Finish button to see the output as shown in the below figure:
newtonapples.com/oracle-report-data-model-groups/
15/18
9/1/13
Comments:
newtonapples.com/oracle-report-data-model-groups/
16/18