<?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="Department" language="groovy" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" resourceBundle="department">
	<parameter name="gender" class="java.util.Collection"/>
	<parameter name="maritalStatus" class="java.util.Collection"/>
	<parameter name="department" class="java.lang.Integer"/>
	<queryString>
		<![CDATA[select *
from employee as emp
inner join department as dep
where dep.department_id=$P{department} and $X{IN, emp.gender, gender} and $X{IN, marital_status, maritalStatus}]]>
	</queryString>
	<field name="employee_id" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="full_name" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="first_name" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="last_name" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="position_id" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="position_title" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="store_id" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="department_id" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="birth_date" class="java.sql.Date">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="hire_date" class="java.sql.Timestamp">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="end_date" class="java.sql.Timestamp">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="salary" class="java.math.BigDecimal">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="supervisor_id" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="education_level" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="marital_status" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="gender" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="management_role" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="department_description" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<group name="Group1">
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<group name="Group2">
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<group name="Group3">
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<group name="Group4">
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<background>
		<band/>
	</background>
	<title>
		<band height="72">
			<frame>
				<reportElement mode="Opaque" x="-20" y="-20" width="595" height="92" backcolor="#006699"/>
				<textField>
					<reportElement x="20" y="20" width="234" height="43" forecolor="#FFFFFF"/>
					<textElement>
						<font size="34" isBold="true"/>
					</textElement>
                    <textFieldExpression class="java.lang.String"><![CDATA[$R{title}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement x="395" y="43" width="180" height="20" forecolor="#FFFFFF"/>
					<textElement textAlignment="Right">
						<font size="14" isBold="false"/>
					</textElement>
                    <textFieldExpression class="java.lang.String"><![CDATA[$R{description}]]></textFieldExpression>
				</textField>
			</frame>
		</band>
	</title>
	<pageHeader>
		<band height="13"/>
	</pageHeader>
	<columnHeader>
		<band height="21">
			<textField>
				<reportElement mode="Opaque" x="0" y="0" width="200" height="20" forecolor="#006699" backcolor="#E6E6E6"/>
				<textElement textAlignment="Center">
					<font size="14" isBold="true"/>
				</textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$R{field.department}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="-20" y="20" width="595" height="1" forecolor="#666666"/>
			</line>
			<textField>
				<reportElement mode="Opaque" x="200" y="0" width="120" height="20" forecolor="#006699" backcolor="#E6E6E6"/>
				<textElement textAlignment="Center">
					<font size="14" isBold="true"/>
				</textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$R{field.name}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="320" y="0" width="120" height="20" forecolor="#006699" backcolor="#E6E6E6"/>
				<textElement textAlignment="Center">
					<font size="14" isBold="true"/>
				</textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$R{field.gender}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="440" y="0" width="120" height="20" forecolor="#006699" backcolor="#E6E6E6"/>
				<textElement textAlignment="Center">
					<font size="14" isBold="true"/>
				</textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$R{field.maritalStatus}]]></textFieldExpression>
			</textField>
		</band>
	</columnHeader>
	<detail>
		<band height="31">
			<textField isStretchWithOverflow="true">
				<reportElement x="0" y="0" width="200" height="20"/>
				<textElement>
					<font size="14"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{department_description}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement x="200" y="0" width="120" height="20"/>
				<textElement textAlignment="Center">
					<font size="14"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{full_name}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement x="320" y="0" width="120" height="20"/>
				<textElement textAlignment="Center">
					<font size="14"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{gender}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement x="440" y="0" width="120" height="20"/>
				<textElement textAlignment="Center">
					<font size="14"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{marital_status}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band/>
	</columnFooter>
	<pageFooter>
		<band height="32">
			<textField>
				<reportElement mode="Opaque" x="0" y="4" width="515" height="13" backcolor="#E6E6E6"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement mode="Opaque" x="515" y="4" width="40" height="13" backcolor="#E6E6E6"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField pattern="EEEEE dd MMMMM yyyy">
				<reportElement x="0" y="4" width="100" height="13"/>
				<textElement/>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<summary>
		<band/>
	</summary>
</jasperReport>
