<?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="licencia_no_rem" language="groovy" pageWidth="468" pageHeight="610" orientation="Landscape" columnWidth="468" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.948717100000002"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="whereFuncionarioNumDoc" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="whereFuncionarioTipoDoc" class="java.lang.String">
		<defaultValueExpression><![CDATA[" "]]></defaultValueExpression>
	</parameter>
	<parameter name="periodo" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="id_periodo" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="fecha_corte" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="numero_letras" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="destino" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<parameter name="comando" class="java.lang.String">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="sexo" class="java.math.BigDecimal"/>
	<queryString>
		<![CDATA[SELECT

to_char(tab0.fecha_ini,'dd') as dia_ini,
trim(INITCAP(TO_CHAR(tab0.fecha_ini,'MONTH','nls_date_language=spanish'))) as MES_ini,
TO_CHAR(tab0.fecha_ini,'yyyy') as anho_ini,
to_char(tab0.fecha_fin,'dd') as dia_fin,
trim(INITCAP(TO_CHAR(tab0.fecha_fin,'MONTH','nls_date_language=spanish'))) as MES_fin,
TO_CHAR(tab0.fecha_fin,'yyyy') as anho_fin,

initcap(tab0.numero_doc) as text_res,

tab0.*

FROM no_novedad_kardex tab0

left join no_tip_nov_ka tipnov
on tipnov.id_tip_nov_ka = tab0.id_tip_nov_ka

WHERE  tab0.id_periodo != '-1'
and tipnov.afecta_antigu = 1 and tipnov.suspension = 0
and tab0.estado = 1
$P!{whereFuncionarioNumDoc} $P!{whereFuncionarioTipoDoc}

ORDER BY
tab0.num_doc,
tab0.fecha_ini]]>
	</queryString>
	<field name="DIA_INI" class="java.lang.String"/>
	<field name="MES_INI" class="java.lang.String"/>
	<field name="ANHO_INI" class="java.lang.String"/>
	<field name="DIA_FIN" class="java.lang.String"/>
	<field name="MES_FIN" class="java.lang.String"/>
	<field name="ANHO_FIN" class="java.lang.String"/>
	<field name="TEXT_RES" class="java.lang.String"/>
	<field name="ID_NOVEDAD_KARDEX" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_DOC" class="java.math.BigDecimal"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="ID_TIP_NOV_KA" class="java.math.BigDecimal"/>
	<field name="FECHA_INI" class="java.sql.Timestamp"/>
	<field name="FECHA_FIN" class="java.sql.Timestamp"/>
	<field name="NUM_DIAS" class="java.math.BigDecimal"/>
	<field name="NUMERO_DOC" class="java.lang.String"/>
	<field name="FECHA_DOC" class="java.sql.Timestamp"/>
	<field name="OBSERVACIONES" class="java.lang.String"/>
	<field name="PRORROGA" class="java.math.BigDecimal"/>
	<field name="NUM_DIAS_ANT" class="java.math.BigDecimal"/>
	<field name="NUM_INCAPACIDAD" class="java.lang.String"/>
	<field name="FECHA_INC" class="java.sql.Timestamp"/>
	<field name="ID_PERIODO" class="java.math.BigDecimal"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="ID_PERIODO_BASE" class="java.math.BigDecimal"/>
	<variable name="suma_dev" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<detail>
		<band height="30" splitType="Stretch">
			<textField>
				<reportElement x="0" y="0" width="468" height="30" isRemoveLineWhenBlank="true"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Top">
					<font size="11"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Del " + $F{DIA_INI} + " de " + $F{MES_INI} + " al " + $F{DIA_FIN} + " de " + $F{MES_FIN} + " de " + $F{ANHO_FIN} + " le fue concedida licencia no remunerada mediante " + $F{TEXT_RES} + " de " + $F{ANHO_INI} + "."]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
	<noData>
		<band/>
	</noData>
</jasperReport>
