XML
Template:
OUTPUT
<?xml version="1.0" encoding="WINDOWS-1252"?>
<!-- Generated by Oracle Reports version 10.1.2.0.2 -->
<EMP>
<LIST_G_EMP>
<G_EMP>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<MGR>7902</MGR>
<HIREDATE>17-DEC-80</HIREDATE>
<SAL>800</SAL>
<COMM></COMM>
<DEPTNO>20</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>20-FEB-81</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
<DEPTNO>30</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7521</EMPNO>
<ENAME>WARD</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>22-FEB-81</HIREDATE>
<SAL>1250</SAL>
<COMM>500</COMM>
<DEPTNO>30</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7566</EMPNO>
<ENAME>JONES</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>02-APR-81</HIREDATE>
<SAL>2975</SAL>
<COMM></COMM>
<DEPTNO>20</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7654</EMPNO>
<ENAME>MARTIN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>28-SEP-81</HIREDATE>
<SAL>1250</SAL>
<COMM>1400</COMM>
<DEPTNO>30</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7698</EMPNO>
<ENAME>BLAKE</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>01-MAY-81</HIREDATE>
<SAL>2850</SAL>
<COMM></COMM>
<DEPTNO>30</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>09-JUN-81</HIREDATE>
<SAL>2450</SAL>
<COMM></COMM>
<DEPTNO>10</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7788</EMPNO>
<ENAME>SCOTT</ENAME>
<JOB>ANALYST</JOB>
<MGR>7566</MGR>
<HIREDATE>09-DEC-82</HIREDATE>
<SAL>3000</SAL>
<COMM></COMM>
<DEPTNO>20</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7839</EMPNO>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
<MGR></MGR>
<HIREDATE>17-NOV-81</HIREDATE>
<SAL>5000</SAL>
<COMM></COMM>
<DEPTNO>10</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7844</EMPNO>
<ENAME>TURNER</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>08-SEP-81</HIREDATE>
<SAL>1500</SAL>
<COMM></COMM>
<DEPTNO>30</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7876</EMPNO>
<ENAME>ADAMS</ENAME>
<JOB>CLERK</JOB>
<MGR>7788</MGR>
<HIREDATE>12-JAN-83</HIREDATE>
<SAL>1100</SAL>
<COMM></COMM>
<DEPTNO>20</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7900</EMPNO>
<ENAME>JAMES</ENAME>
<JOB>CLERK</JOB>
<MGR>7698</MGR>
<HIREDATE>03-DEC-81</HIREDATE>
<SAL>950</SAL>
<COMM></COMM>
<DEPTNO>30</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7902</EMPNO>
<ENAME>FORD</ENAME>
<JOB>ANALYST</JOB>
<MGR>7566</MGR>
<HIREDATE>03-DEC-81</HIREDATE>
<SAL>3000</SAL>
<COMM></COMM>
<DEPTNO>20</DEPTNO>
</G_EMP>
<G_EMP>
<EMPNO>7934</EMPNO>
<ENAME>MILLER</ENAME>
<JOB>CLERK</JOB>
<MGR>7782</MGR>
<HIREDATE>23-JAN-82</HIREDATE>
<SAL>1300</SAL>
<COMM></COMM>
<DEPTNO>10</DEPTNO>
</G_EMP>
</LIST_G_EMP>
</EMP>
Template:
Sub Totals
In XMLP(RTF) - Emp Sub Totals Report
<?IF:count(//G_EMP)!=0?>Summary:
Dept No
|
Salary
|
<?for-each-group: G_EMP;
DEPTNO?><?sort:DEPTNO;'ascending';data-type=number?><?DEPTNO?>
|
<?sum(current-group()/SAL)?><?end
for-each-group?>
|
Total :
|
<?sum(G_EMP/SAL)?>
|
<?END IF?>
<?IF:count(//G_EMP)!=0?>Detail:
Dept No
|
Employee No
|
Employee Name
|
Job
|
Manager
|
Hire Date
|
Salary
|
<?for-each:G_EMP?><?sort:DEPTNO;'ascending';data-type=number?> <?DEPTNO?>
|
<?EMPNO?>
|
<?ENAME?>
|
<?JOB?>
|
<?MGR?>
|
<?HIREDATE?>
|
<?SAL?> <?end for-each?>
|
Total :
|
<?sum(G_EMP/SAL)?>
|
<?END IF?>
<?if:count(//G_EMP)!=0?>End of
Report<?end if?> <?if:count(//G_EMP)=0?>No Data
Found<?end if?>
OUTPUT
Sub Totals In XMLP(RTF) - Emp Sub Totals Report
|
||||||
Summary:
|
||||||
Dept No
|
Salary
|
|||||
10
|
8750
|
|||||
20
|
10875
|
|||||
30
|
9400
|
|||||
Total :
|
29025
|
|||||
Detail:
|
||||||
Dept No
|
Employee No
|
Employee Name
|
Job
|
Manager
|
Hire Date
|
Salary
|
10
|
7782
|
CLARK
|
MANAGER
|
7839
|
9-Jun-81
|
2450
|
10
|
7839
|
KING
|
PRESIDENT
|
|
17-Nov-81
|
5000
|
10
|
7934
|
MILLER
|
CLERK
|
7782
|
23-Jan-82
|
1300
|
20
|
7369
|
SMITH
|
CLERK
|
7902
|
17-Dec-80
|
800
|
20
|
7566
|
JONES
|
MANAGER
|
7839
|
2-Apr-81
|
2975
|
20
|
7788
|
SCOTT
|
ANALYST
|
7566
|
9-Dec-82
|
3000
|
20
|
7876
|
ADAMS
|
CLERK
|
7788
|
12-Jan-83
|
1100
|
20
|
7902
|
FORD
|
ANALYST
|
7566
|
3-Dec-81
|
3000
|
30
|
7499
|
ALLEN
|
SALESMAN
|
7698
|
20-Feb-81
|
1600
|
30
|
7521
|
WARD
|
SALESMAN
|
7698
|
22-Feb-81
|
1250
|
30
|
7654
|
MARTIN
|
SALESMAN
|
7698
|
28-Sep-81
|
1250
|
30
|
7698
|
BLAKE
|
MANAGER
|
7839
|
1-May-81
|
2850
|
30
|
7844
|
TURNER
|
SALESMAN
|
7698
|
8-Sep-81
|
1500
|
30
|
7900
|
JAMES
|
CLERK
|
7698
|
3-Dec-81
|
950
|
|
|
|
|
|
Total :
|
29025
|
No comments:
Post a Comment