<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:og="hybs-taglib.tld" 
	version="2.0">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />

<og:head headType="result" >
	<style type="text/css">
		.SU { background-color:#ccff00; }
	</style>
</og:head>
<jsp:directive.include file="/jsp/custom/result_info.jsp" />
<og:comment
	system	= "GF:エンジンサンプル"
	pgid	= "GF6070"
	title	= "クロス集計"
	date	= "2008/10/27"
	author	= "Hiroki.Nakamura"
	text	= ""
	version	= "001"
/>
<!-- 入力チェック -->
<og:columnCheck
	command   = "{@command}"
/>

<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
		SELECT DEPT.DNAME,EMP.DEPTNO,SUBSTRB(JOB,1,2) AS JOBKEY,
				{@CUBE_X},{@CUBE_Y},SUM(SAL) AS KEI,COUNT(*) AS SU
		FROM EMP,DEPT
		WHERE EMP.DEPTNO = DEPT.DEPTNO
		GROUP BY DEPT.DNAME,EMP.DEPTNO,CUBE({@CUBE_X},{@CUBE_Y})
		ORDER BY EMP.DEPTNO,{@CUBE_X},{@CUBE_Y}
</og:query>

<!-- DB検索結果を表示させます。 -->
<og:view
	viewFormType = "HTMLCrossTable" 
	command    = "{@command}" 
	checked    = "{@checked}"
	startNo    = "{@startNo}" 
	pageSize   = "{@pageSize}" 
	useParam   = "true"
>
	<og:crossParam
		breakColumn 	= "DEPTNO"
		noGroupColumns	= "JOBKEY"
		cubeXColumn 	= "{@CUBE_X}"
		cubeYColumn 	= "{@CUBE_Y}"
		sumNumber		= "2"
		shokeiLabel 	= "SHOKEI"
		gokeiLabel		= "GOKEI"
		cubeSortType	= "{@cubeSortType}"
		gokeiSortDir	= "{@gokeiSortDir}"
		useHeaderColumn = "{@useHeaderColumn}"
		saveTableId		= "{@saveTableId}"
		useClassAdd		= "{@useClassAdd}"
	/>
</og:view>

<og:view />

<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
