Page 1 of 1

How to Set Order of a Matrix Report

Posted: Thu Jun 22, 2006 9:59 am
by mufti_sb
[img]C:\Documents%20and%20Settings\mudasser\My%20Documents\My%20Pictures\Matrix.gif[/img]
How to Set the Order of a Matrix Report please see the attached file for detil

or use simple Emp & Dept Tables to create an Matrix Report.
on row take Deptno , on Column Take Job & take sal as matrix cell
and try to sort report based on sum sal per dept.

SELECT DEPTNO,JOB,SUM(NVL(SAL,0))
FROM EMP
GROUP BY DEPTNO,JOB
ORDER BY SUM(NVL(SAL,0)) DESC

DEPTNO JOB SUM(NVL(SA
---------- --------- ----------
20 ANALYST 6000
30 SALESMAN 5600
10 PRESIDENT 5000
20 MANAGER 2975
30 MANAGER 2850
10 MANAGER 2450
20 CLERK 1900
10 CLERK 1300
30 CLERK 950

Regards,
Mudasser Sharif

Posted: Wed Jun 28, 2006 5:52 am
by najm
it's very easy just Shift the attribute of sum on top of a group fields if not understand just tell i put it with example.



Chears

Najm