Вы находитесь на странице: 1из 15

9/1/13

REP| 03| -12 Data Model Groups

See other relevant topics

No relevant added yet. Give us sometime to get this right!

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

REP| 03| -12 Data Model Groups

So now create a data model by using above query

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

REP| 03| -12 Data Model Groups

Then click on CONNECT.


Here data model looks like

newtonapples.com/oracle-report-data-model-groups/

4/18

9/1/13

REP| 03| -12 Data Model Groups

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

REP| 03| -12 Data Model Groups

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

REP| 03| -12 Data Model Groups

In style tab, select layout Group Above.

newtonapples.com/oracle-report-data-model-groups/

7/18

9/1/13

REP| 03| -12 Data Model Groups

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

REP| 03| -12 Data Model Groups

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

REP| 03| -12 Data Model Groups

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

REP| 03| -12 Data Model Groups

Click on NEXT

newtonapples.com/oracle-report-data-model-groups/

11/18

9/1/13

REP| 03| -12 Data Model Groups

Click on NEXT you will find a window for aggregate calculations:

newtonapples.com/oracle-report-data-model-groups/

12/18

9/1/13

REP| 03| -12 Data Model Groups

Click on NEXT

newtonapples.com/oracle-report-data-model-groups/

13/18

9/1/13

REP| 03| -12 Data Model Groups

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

REP| 03| -12 Data Model Groups

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

REP| 03| -12 Data Model Groups

<< Report With Simple Data Model


Place Holder>>
This post has been viewed 1190 times

About the Author: Venkat

(15 votes, average: 5.00 out of 5)


Loading ...
Disclaimer: Contents expressed in this post are viewpoints of independent authors/contributors and are not reviewed for correctness or accuracy by
NewtonApples.com. Any opinions, comments, solutions or other commentary expressed by post authors/contributors are not endorsed or
recommended by NewtonApples.com or any vendor. If you feel a post is inappropriate, click here to let us know and we will take the appropriate
action

Comments:
newtonapples.com/oracle-report-data-model-groups/

16/18

Вам также может понравиться