<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="wave_task_det_1" pageWidth="756" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="720" leftMargin="18" rightMargin="18" topMargin="18" bottomMargin="18">
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="P_wave_id" class="java.lang.String"/>
	<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
		<parameterDescription><![CDATA[]]></parameterDescription>
		<defaultValueExpression><![CDATA["E:\\manohar\\reports\\"]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT WAVE_TASK_DET.WAVE_ID,
                 FN_WAVE_DESCRIPTION(REFSER.REF_SER,WAVE_TASK_DET.REF_ID,WAVE_TASK_DET.PTCN) DESCR,
(CASE  WHEN WAVE_TASK_DET.wave_status ='C' THEN 'Created' when WAVE_TASK_DET.wave_status ='W' then 'Held'
       when  WAVE_TASK_DET.wave_status ='V' then 'Verified' ELSE NULL END) WAVESTATUS,WAVE_SEQ.PRIORITY,COUNT(*) CNT
FROM   WAVE_TASK_DET,REFSER, WAVE_SEQ
WHERE  WAVE_TASK_DET.REF_SER= REFSER.REF_SER
AND    WAVE_ID =$P{P_wave_id}
AND    WAVE_TASK_DET.REF_SER = WAVE_SEQ.REF_SER
GROUP BY WAVE_TASK_DET.WAVE_ID, FN_WAVE_DESCRIPTION(REFSER.REF_SER,WAVE_TASK_DET.REF_ID,WAVE_TASK_DET.PTCN),
(CASE  WHEN WAVE_TASK_DET.wave_status ='C' THEN 'Created' when WAVE_TASK_DET.wave_status ='W' then 'Held'
       when  WAVE_TASK_DET.wave_status ='V' then 'Verified' ELSE NULL END), WAVE_SEQ.PRIORITY 
       order by WAVE_SEQ.PRIORITY,FN_WAVE_DESCRIPTION(REFSER.REF_SER,WAVE_TASK_DET.REF_ID,WAVE_TASK_DET.PTCN),WAVESTATUS,CNT]]>
	</queryString>
	<field name="WAVE_ID" class="java.lang.String"/>
	<field name="DESCR" class="java.lang.String"/>
	<field name="WAVESTATUS" class="java.lang.String"/>
	<field name="PRIORITY" class="java.lang.Integer"/>
	<field name="CNT" class="java.lang.Integer"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="18" splitType="Stretch">
			<staticText>
				<reportElement x="5" y="4" width="359" height="14"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Wave Tasks Details]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="21" splitType="Stretch">
			<staticText>
				<reportElement x="3" y="1" width="62" height="20"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Wave Id]]></text>
			</staticText>
			<staticText>
				<reportElement x="68" y="1" width="162" height="20"/>
				<textElement>
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Task Description]]></text>
			</staticText>
			<line>
				<reportElement x="2" y="0" width="362" height="1"/>
			</line>
			<line>
				<reportElement x="2" y="20" width="362" height="1"/>
			</line>
			<line>
				<reportElement x="66" y="1" width="1" height="20"/>
			</line>
			<line>
				<reportElement x="2" y="1" width="1" height="20"/>
			</line>
			<line>
				<reportElement x="231" y="1" width="1" height="20"/>
			</line>
			<line>
				<reportElement x="364" y="0" width="1" height="20"/>
			</line>
			<staticText>
				<reportElement x="233" y="1" width="70" height="20"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Task Status]]></text>
			</staticText>
			<line>
				<reportElement x="304" y="0" width="1" height="20"/>
			</line>
			<staticText>
				<reportElement x="307" y="1" width="55" height="20"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Task Count]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement x="5" y="0" width="60" height="20"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{WAVE_ID}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="68" y="0" width="162" height="20"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESCR}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="2" y="19" width="362" height="1"/>
			</line>
			<line>
				<reportElement x="66" y="0" width="1" height="20"/>
			</line>
			<line>
				<reportElement x="2" y="0" width="1" height="20"/>
			</line>
			<line>
				<reportElement x="2" y="-1" width="362" height="1"/>
			</line>
			<line>
				<reportElement x="231" y="-1" width="1" height="20"/>
			</line>
			<line>
				<reportElement x="364" y="-1" width="1" height="20"/>
			</line>
			<textField>
				<reportElement x="233" y="0" width="70" height="20"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{WAVESTATUS}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="304" y="-1" width="1" height="20"/>
			</line>
			<textField>
				<reportElement x="307" y="0" width="55" height="20"/>
				<textElement textAlignment="Right">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$F{CNT}]]></textFieldExpression>
			</textField>
		</band>
		<band/>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
	<noData>
		<band height="56">
			<staticText>
				<reportElement x="5" y="1" width="351" height="14"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Wave Tasks Details]]></text>
			</staticText>
			<line>
				<reportElement x="290" y="15" width="1" height="20"/>
			</line>
			<staticText>
				<reportElement x="68" y="16" width="162" height="20"/>
				<textElement>
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Task Description]]></text>
			</staticText>
			<line>
				<reportElement x="2" y="35" width="1" height="20"/>
			</line>
			<staticText>
				<reportElement x="3" y="36" width="350" height="19"/>
				<textElement textAlignment="Center"/>
				<text><![CDATA[NA]]></text>
			</staticText>
			<line>
				<reportElement x="353" y="35" width="1" height="20"/>
			</line>
			<staticText>
				<reportElement x="3" y="16" width="62" height="20"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Wave Id]]></text>
			</staticText>
			<line>
				<reportElement x="2" y="55" width="351" height="1"/>
			</line>
			<line>
				<reportElement x="2" y="16" width="1" height="20"/>
			</line>
			<line>
				<reportElement x="231" y="16" width="1" height="20"/>
			</line>
			<staticText>
				<reportElement x="292" y="16" width="61" height="20"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Task Count]]></text>
			</staticText>
			<staticText>
				<reportElement x="232" y="16" width="58" height="20"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Task Status]]></text>
			</staticText>
			<line>
				<reportElement x="2" y="35" width="351" height="1"/>
			</line>
			<line>
				<reportElement x="66" y="16" width="1" height="20"/>
			</line>
			<line>
				<reportElement x="353" y="15" width="1" height="20"/>
			</line>
			<line>
				<reportElement x="2" y="15" width="351" height="1"/>
			</line>
		</band>
	</noData>
</jasperReport>
