<?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="no_ana_planta_personal_ocupada" language="groovy" pageWidth="572" pageHeight="752" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.2100000000000009"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/nomina/no_ana_novedades"/>
	<property name="ireport.jasperserver.url" value="http://192.168.2.43:8090/jasperserver/services/repository"/>
	<parameter name="id_periodo" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_anhos" class="java.lang.String">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<parameter name="id_meses" class="java.lang.String">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT  tab0.ID_TIPO_NOV_VAC, tab1.descripcion as tabla,count(tab0.ID_TIPO_NOV_VAC)  as cantidad
FROM NO_NOVEDAD_VAC tab0
LEFT JOIN NO_TIPO_NOV_VAC tab1 ON tab0.ID_TIPO_NOV_VAC=tab1.ID_TIPO_NOV_VAC
LEFT JOIN NO_PERIODO tab2 ON tab0.id_periodo = tab2.id_periodo
WHERE  tab2.id_anhos = $P!{id_anhos}
and tab2.id_meses= $P!{id_meses}
GROUP BY tab0.ID_TIPO_NOV_VAC, tab1.descripcion
ORDER BY tab0.ID_TIPO_NOV_VAC]]>
	</queryString>
	<field name="ID_TIPO_NOV_VAC" class="java.math.BigDecimal"/>
	<field name="TABLA" class="java.lang.String"/>
	<field name="CANTIDAD" class="java.math.BigDecimal"/>
	<variable name="cantidad" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{CANTIDAD}]]></variableExpression>
	</variable>
	<columnHeader>
		<band height="38" splitType="Stretch">
			<staticText>
				<reportElement x="0" y="0" width="572" height="20"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Cantidad de Novedades de Vacaciones]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="194" y="26" width="100" height="12" forecolor="#000000" backcolor="#AED6FB"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Nivel]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="294" y="26" width="100" height="12" forecolor="#000000" backcolor="#AED6FB"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Cantidad]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="10" splitType="Stretch">
			<textField>
				<reportElement x="194" y="0" width="100" height="10"/>
				<box leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TABLA}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="294" y="0" width="100" height="10"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{CANTIDAD}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="11" splitType="Stretch"/>
	</columnFooter>
	<summary>
		<band height="195" splitType="Stretch">
			<textField>
				<reportElement mode="Opaque" x="294" y="0" width="100" height="10" backcolor="#CFCFCF"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{cantidad}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="194" y="0" width="100" height="10" forecolor="#000000" backcolor="#AED6FB"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Total]]></text>
			</staticText>
			<pie3DChart>
				<chart>
					<reportElement x="0" y="38" width="572" height="157"/>
					<chartTitle/>
					<chartSubtitle/>
					<chartLegend/>
				</chart>
				<pieDataset>
					<keyExpression><![CDATA[$F{TABLA}]]></keyExpression>
					<valueExpression><![CDATA[$F{CANTIDAD}]]></valueExpression>
					<labelExpression><![CDATA[$F{TABLA}]]></labelExpression>
				</pieDataset>
				<pie3DPlot>
					<plot/>
					<itemLabel color="#000000" backgroundColor="#FFFFFF"/>
				</pie3DPlot>
			</pie3DChart>
		</band>
	</summary>
</jasperReport>
